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!)
A034901 a(n) is square mod a(i), i < n; a(n) nonsquare; a(1) = 2. 2

%I #15 Sep 25 2020 07:32:37

%S 2,3,6,7,15,21,30,39,51,120,204,480,816,849,2041,2185,4785,19140,

%T 21505,43065,44080,49504,59185,172260,176320,178465,236740,387585,

%U 443521,552601,1774084,2210404,2310385,3991689,4973409,5371081,7096336

%N a(n) is square mod a(i), i < n; a(n) nonsquare; a(1) = 2.

%o (PARI) isok(newa, v, n) = {for (k=1, n, if (!issquare(Mod(newa, v[k])), return (0));); return (1);}

%o nextnonsq(n) = my(k=n); while (issquare(k), k++); k;

%o lista(nn) = {my(v=vector(nn), lasta=2); v[1] = lasta; for (n=2, nn, my(newa = nextnonsq(lasta+1)); while (! isok(newa, v, n-1), newa = nextnonsq(newa+1)); v[n] = newa; lasta = newa;); v;} \\ _Michel Marcus_, Sep 25 2020

%Y Cf. A000037 (nonsquares), A034900, A034902.

%K nonn

%O 1,1

%A _David W. Wilson_

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 March 28 15:38 EDT 2024. Contains 371254 sequences. (Running on oeis4.)