login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A034175 a(n) is minimal such that a(n)+a(n-1) is a square and a(n) is not in {a(0), ..., a(n-1)}. 9
0, 1, 3, 6, 10, 15, 21, 4, 5, 11, 14, 2, 7, 9, 16, 20, 29, 35, 46, 18, 31, 33, 48, 52, 12, 13, 23, 26, 38, 43, 57, 24, 25, 39, 42, 22, 27, 37, 44, 56, 8, 17, 19, 30, 34, 47, 53, 28, 36, 45, 55, 66, 78, 91, 105, 64, 80, 41, 40, 60, 61, 83, 86, 58, 63, 81, 88, 108, 117, 79, 65 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Conjectured to be a permutation of the nonnegative integers.

Position of k beginning with 0: 0, 1, 11, 2, 7, 8, 3, 12, 40, 13, 4, 9, 24, 25, 10, 5, 14, 41, 19, 42, 15, ..., = A064928. - Robert G. Wilson v, Mar 28 2017

Records: 0, 1, 3, 6, 10, 15, 21, 29, 35, 46, 48, 52, 57, 66, 78, 91, 105, 108, 117, 119, 123, 133, 156, 168, 170, 191, ..., .  - Robert G. Wilson v, Mar 28 2017

LINKS

Z. Seidov and P. Pein, Table of n, a(n) for n = 0..10000

Index entries for sequences that are permutations of the natural numbers

MAPLE

N:= 1000: # to go up to the first term > N

B:= Vector(N):

a[0]:= 0:

found:= true:

for n from 1 while found do

  found:= false:

  for k from floor(sqrt(a[n-1]))+1 do

    b:= k^2 - a[n-1];

    if b > N then a[n]:= b; break fi;

    if B[b] = 0 then

       found:= true;

       a[n]:= b;

       B[b]:= 1;

       break

     fi

  od

od:

seq(a[i], i=0..n-1); # Robert Israel, Jun 02 2015

MATHEMATICA

a[ 0 ]=b[ 0 ]=0; lst={0}; For[ n=1, n<250, n++, For[ s=Ceiling[ Sqrt[ a[ n-1 ] ] ], MemberQ[ lst, s^2-a[ n-1 ] ], s++, Null ]; b[ a[ n ]=s^2-a[ n-1 ] ]=n; AppendTo[ lst, a[ n ] ] ]; Table[ a[ n ], {n, 0, 100} ]

(* Second program: *)

lst = {}; f[s_List] := Block[{k = 1, l = s[[ -1]]}, While[ MemberQ[s, k] || !IntegerQ@ Sqrt[k + l], k++ ]; AppendTo[lst, k]]; Nest[f, lst, 100] (* Robert G. Wilson v, May 09 2010 *)

PROG

(PARI) v=[0]; n=1; while(n<50, if(issquare(v[#v]+n)&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0); n++); v \\ Derek Orr, Jun 01 2015

CROSSREFS

Cf. A064928, A064929, A064930.

Sequence in context: A109443 A138777 A096895 * A139131 A130485 A115015

Adjacent sequences:  A034172 A034173 A034174 * A034176 A034177 A034178

KEYWORD

nonn,easy,nice

AUTHOR

Dean Hickerson, Oct 01 1998

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 22 20:08 EDT 2017. Contains 286906 sequences.