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!)
A137326 a(n) = sqrt(A139033(n)). 3

%I #12 Feb 12 2023 05:37:03

%S 1,2,6,24,36,42,48,66,78,126,138,144,162,210,264,276,288,294,336,390,

%T 420,462,498,504,510,534,540,570,618,630,642,660,690,702,744,780,840,

%U 882,906,984,1002,1008,1020,1044,1050,1086,1140,1176,1188,1278,1290,1308

%N a(n) = sqrt(A139033(n)).

%p s:= proc(n) option remember; `if`(n<1, 0, a(n)^2+s(n-1)) end:

%p a:= proc(n) option remember; local k, m;

%p k:= s(n-1); for m from 1+a(n-1)

%p while not isprime(k+m^2) do od; m

%p end: a(1):=1:

%p seq(a(n), n=1..52); # _Alois P. Heinz_, Jan 26 2023

%t s[n_] := s[n] = If[n < 1, 0, a[n]^2 + s[n-1]];

%t a[n_] := a[n] = Module[{k, m}, k = s[n-1]; For[m = 1 + a[n-1], !PrimeQ[k + m^2], m++]; m];

%t a[1] = 1;

%t Table[a[n], {n, 1, 52}] (* _Jean-François Alcover_, Feb 12 2023, after _Alois P. Heinz_ *)

%Y Cf. A139033.

%K nonn

%O 1,2

%A _Zak Seidov_, Apr 07 2008

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 23 05:56 EDT 2024. Contains 371906 sequences. (Running on oeis4.)