Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A120740
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A120740 Numbers n such that n = Sum_digits[k*abs(n-k)] for some k>=0. +0
1
0, 4, 5, 9, 14, 18, 23, 27, 32, 36, 41, 45, 50, 54, 59, 63, 68, 72, 77, 81, 86, 90, 95, 99, 104, 108, 113, 117, 122, 126, 131, 135, 140, 144, 149, 153, 158, 162, 167, 171, 176, 180, 185, 189, 194, 198, 203, 207, 212, 216, 221, 225, 230, 234, 239, 243, 248, 252 (list; graph; listen)
OFFSET

1,2

COMMENT

The first difference is eventually 2-periodic: 4, 1, 4, 5, 4, 5, 4, etc. The minimum numbers k associated to the first elements of the sequence are (n,k): (0,0), (4,2), (5,7), (9,3), (14,19), (18,33), (23,67), (27,69), etc.

FORMULA

a(n)=9/2*(n-1)+4*{1-[(n+2) mod (n+1)]+[n!^2 mod (n+1)]*[(n+1)!^2 mod (n+2)]}+Sum{j=0..n}{(-1)^j/2}

EXAMPLE

n = 36 -> k = 279 -> 279*abs(36-279)=279*243=67797 -> 6+7+7+9+7 = 36

MAPLE

P:=proc(n) local i, j, k, w; for i from 0 by 1 to n do for j from 0 by 1 to 100*n do w:=0; k:=j*abs(i-j); while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; if w=i then print(i); break; fi; od; od; end: P(100000);

CROSSREFS

Cf. A130877.

Adjacent sequences: A120737 A120738 A120739 this_sequence A120741 A120742 A120743

Sequence in context: A116045 A096818 A038099 this_sequence A000285 A042031 A041493

KEYWORD

nonn,base

AUTHOR

Paolo P. Lava & Giorgio Balzarotti (ppl(AT)spl.at), Jul 26 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified May 16 23:01 EDT 2008. Contains 139884 sequences.


AT&T Labs Research