login

Revision History for A054048

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Earliest sequence with a(a(n)) = n*(n+1)/2 (Triangular numbers).
(history; published version)
#18 by Wesley Ivan Hurt at Fri Jul 29 22:02:17 EDT 2022
STATUS

editing

approved

#17 by Wesley Ivan Hurt at Fri Jul 29 22:02:05 EDT 2022
NAME

Earliest sequence with a(a(n)) = n*(n+1)/2 (Triangular numbers).

EXAMPLE

a(a(3)) = a(10) = 6 = 3*4/2.

STATUS

approved

editing

#16 by Charles R Greathouse IV at Thu Nov 21 13:11:33 EST 2013
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}] (* From _Jean-François Alcover, _, Jan 05 2012 *)

Discussion
Thu Nov 21
13:11
OEIS Server: https://oeis.org/edit/global/2066
#15 by Russ Cox at Fri Mar 30 18:51:20 EDT 2012
AUTHOR

_Henry Bottomley (se16(AT)btinternet.com), _, Apr 28 2000

Discussion
Fri Mar 30
18:51
OEIS Server: https://oeis.org/edit/global/247
#14 by N. J. A. Sloane at Thu Jan 12 09:28:47 EST 2012
STATUS

proposed

approved

#13 by Jean-François Alcover at Thu Jan 12 06:21:10 EST 2012
STATUS

editing

proposed

#12 by Jean-François Alcover at Thu Jan 12 06:20:29 EST 2012
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] ] ]; triQ[0] = 0; 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}] (* From Jean-François Alcover, Jan 05 2012 *)

STATUS

approved

editing

Discussion
Thu Jan 12
06:21
Jean-François Alcover: Superfluous instruction deleted
#11 by Bruno Berselli at Thu Jan 05 17:59:53 EST 2012
STATUS

proposed

approved

#10 by Jean-François Alcover at Thu Jan 05 09:31:10 EST 2012
STATUS

editing

proposed

#9 by Jean-François Alcover at Thu Jan 05 09:28:06 EST 2012
MATHEMATICA

nmax = 60; a[0]=0; a[1]=1; a0[2]=4; a0[5]=7; a0[20]=22; a0[27]=29; a0[54]=5658; a0[n_] :amax = n+12000; ftri[n_, 1] := f[n, 1] = {n, a[n] = a0[n], n*(n+1)/2}; ftriQ[n_, k_] := ftriQ[n, ] = Resolve[ Exists[ k] = With[{m = f, Reduce[ k > 0 && n, == tri[k], k-, Integers] ] ]; triQ[0] = 0; t = {{0, a[0] = 0}, {1, a[1][ = 1}, {2, a[2]]}, {m , }; While[ !FreeQ[t, a[m] , t = fTable[ {n, a[n, k-]}, {n, 0, nmax}]; n = Select[t, !IntegerQ[#[[2]]]& , 1][[3]], m*(m+1)/2}]; Do[ k=, 1]]; Ift2 = 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[ fan < amax, an = a[n, k++][[1]] < = nmax]an], { = tri[n, 2, nmax}] ] ]; A054048 = Table[ a[n] , , {n, 0, nmax}] (* From Jean-François Alcover, Dec 30 2011 Jan 05 2012 *)

STATUS

approved

editing

Discussion
Thu Jan 05
09:31
Jean-François Alcover: In the previous version of the Mathematica program, some values were computed "manually".