A307136 a(n) = ceiling(2*sqrt(A000037(n))), n >= 1.
3, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20
Offset: 1
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
Programs
-
Maple
seq(i$((i-2+(i mod 2))/2),i=3..20); # Robert Israel, Mar 26 2019
-
Mathematica
A307136[n_] := Ceiling[2*Sqrt[n+Round[Sqrt[n]]]]; Array[A307136, 100] (* or *) Flatten[Array[ConstantArray[#, Floor[(#-1)/2]] &, 19, 3]] (* Paolo Xausa, Feb 29 2024 *)
-
PARI
lista(nn) = for (n=1, nn, if (!issquare(n), print1(ceil(2*sqrt(n)), ", "))); \\ Michel Marcus, Mar 26 2019
-
Python
from math import isqrt def A307136(n): return 1+isqrt((n+isqrt(n+isqrt(n))<<2)-1) # Chai Wah Wu, Jul 28 2022
Formula
a(n) = ceiling(2*sqrt(A000037(n))), n >= 1.
s(n):= floor((a(n)-1)/2) = A000194(n) = A000037(n) - n, for n >= 1. See a comment above for the multiplicity of a(n).
G.f.: (Theta2(0,x)/x^(1/4) + Theta3(0,x)+3)*x/(2*(1-x)) where Theta2 and Theta3 are Jacobi Theta functions. - Robert Israel, Mar 26 2019
Comments