login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333663 a(1) = 1, then a(n) is the smallest square not occurring earlier and starting with the last nonzero digit of a(n-1). 2
1, 16, 64, 4, 49, 9, 900, 961, 100, 121, 144, 400, 441, 169, 9025, 529, 9216, 625, 576, 676, 6084, 484, 4096, 6241, 196, 6400, 4225, 5041, 1024, 4356, 6561, 1089, 9409, 9604, 4489, 9801, 1156, 6724, 4624, 4761, 1225, 5184, 4900, 90000, 90601, 1296, 6889, 91204 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Every term begins with 1, 4, 5, 6 or 9.
LINKS
EXAMPLE
The smallest square not yet in the data that begins with 1 is 16, hence a(2) = 16.
MATHEMATICA
Nest[Block[{a = #, k = 1, d = Mod[#[[-1]]/10^IntegerExponent[#[[-1]] ], 10]}, While[Nand[FreeQ[a, #], d == Floor[#/10^(IntegerLength[#] - 1)] ] &[k^2], k++]; Append[a, k^2]] &, {1}, 47] (* Michael De Vlieger, Sep 11 2020 *)
PROG
(PARI) nxt(va, d) = {my(k=1); while ((digits(k^2)[1]!=d) || #select(x->(x==k^2), va), k++); k^2; }
lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = nxt(va, digits(fromdigits(Vecrev(digits(va[n-1]))))[1]); ); va; } \\ Michel Marcus, Sep 04 2020
CROSSREFS
Cf. A155985 (variant).
Subsequences of squares with initial digit k: A045784 (k=1), A045787 (k=4), A045788 (k=5), A045789 (k=6), A045793 (k=9).
Sequence in context: A060091 A076751 A215969 * A155985 A211222 A250102
KEYWORD
nonn,easy,base
AUTHOR
Bernard Schott, Sep 03 2020
EXTENSIONS
More terms from Michel Marcus, Sep 04 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)