login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A347594 a(0) = 1; for n>0, a(n) is the smallest positive integer such that a(n-1)^2 + n^2 + a(n) is a square. 5
1, 2, 1, 6, 12, 27, 19, 31, 64, 48, 96, 72, 1, 26, 28, 15, 3, 26, 24, 24, 48, 64, 44, 35, 48, 96, 108, 151, 131, 223, 447, 831, 639, 190, 380, 299, 507, 663, 1212, 904, 209, 7, 36, 104, 17, 87, 116, 211, 264, 264, 165, 103, 143, 151, 204, 303, 536, 1055, 860, 1688, 3156, 2592, 1341, 1399 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

In the first one million terms the largest value is a(987016) = 123592518669. In this range the smallest number that has not yet appeared is 9.

LINKS

Seiichi Manyama, Table of n, a(n) for n = 0..10000

EXAMPLE

a(1) = 2 as a(0)^2 + 1^2 = 1 + 1 = 2, and 2 + 2 = 4 = 2^2 is the next smallest square.

a(2) = 1 as a(1)^2 + 2^2 = 4 + 4 = 8, and 8 + 1 = 9 = 3^2 is the next smallest square.

a(60) = 3156 as a(59)^2 + 60^2 = 2849344 + 3600 = 2852944, and 2852944 + 3156 = 2856100 = 1690^2 is the next smallest square.

MATHEMATICA

Nest[Append[#, Block[{k = 1, m = Last[#1]}, While[! IntegerQ@ Sqrt[#2^2 + m^2 + k], k++]; k]] & @@ {#, Length@ #} &, {1}, 63] (* Michael De Vlieger, Sep 08 2021 *)

PROG

(Python)

from math import isqrt

A347594_list = [1]

for n in range(1, 10**3):

    m = A347594_list[n-1]**2+n**2

    A347594_list.append((isqrt(m)+1)**2-m) # Chai Wah Wu, Sep 12 2021

(PARI) lista(nn) = {my(prec = 1, list=List()); listput(list, prec); for (n=1, nn, my(k = 1); while (!issquare(prec^2+n^2+k), k++); listput(list, k); prec = k; ); Vec(list); } \\ Michel Marcus, Sep 13 2021

CROSSREFS

Cf. A000290, A103605, A009000, A005408, A347754.

Sequence in context: A342589 A325635 A081064 * A128534 A002562 A218492

Adjacent sequences:  A347591 A347592 A347593 * A347595 A347596 A347597

KEYWORD

nonn,look

AUTHOR

Scott R. Shannon, Sep 08 2021

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 27 20:49 EST 2021. Contains 349395 sequences. (Running on oeis4.)