|
|
A054048
|
|
Earliest sequence with a(a(n)) = n*(n+1)/2 (Triangular numbers).
|
|
2
|
|
|
0, 1, 4, 10, 3, 7, 55, 15, 9, 36, 6, 12, 66, 14, 91, 28, 17, 136, 19, 171, 22, 1540, 210, 24, 276, 26, 325, 29, 120, 378, 31, 465, 33, 528, 35, 595, 45, 38, 703, 40, 780, 42, 861, 44, 946, 666, 47, 1081, 49, 1176, 51, 1275, 53, 1378, 56, 21, 1485, 58, 1653
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
EXAMPLE
|
a(a(3)) = a(10) = 6 = 3*4/2.
|
|
MATHEMATICA
|
nmax = 58; amax = 2000; tri[n_] := n*(n+1)/2; triQ[n_] := triQ[n] = Resolve[ Exists[ k, Reduce[ k > 0 && n == tri[k], k, Integers] ] ]; t = {{0, a[0] = 0}, {1, a[1] = 1}, {2, a[2]}}; While[ !FreeQ[t, a], t = Table[ {n, a[n]}, {n, 0, nmax}]; n = Select[t, !IntegerQ[#[[2]]]& , 1][[1, 1]]; t2 = Union[ Flatten[ Append[ Select[ t, IntegerQ[ #[[2]] ] & ], n] ] ]; an = If[ n == 2, 4, Select[ Complement[ Range[ Max[t2] ], t2], !triQ[#]&, 1][[1]]]; a[n] = an; While[ an < amax, an = a[n = an] = tri[n] ] ]; A054048 = Table[ a[n], {n, 0, nmax}] (* Jean-François Alcover, Jan 05 2012 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nice,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|