A060019 a(n) = floor(2*sqrt(prime(n)-2)) where prime(n) = n-th prime.
0, 2, 3, 4, 6, 6, 7, 8, 9, 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 16, 16, 17, 18, 18, 19, 19, 20, 20, 20, 21, 22, 22, 23, 23, 24, 24, 24, 25, 25, 26, 26, 26, 27, 27, 27, 28, 28, 29, 30, 30, 30, 30, 30, 31, 31, 32, 32, 32, 33, 33, 33, 34, 34, 35, 35, 35
Offset: 1
Keywords
Links
- J. R. Griggs, Spanning subset sums for finite Abelian groups, Discrete Math., 229 (2001), 89-99.
Crossrefs
Cf. A060018.
Programs
-
PARI
a(n) = floor(2*sqrt(prime(n)-2)); \\ Michel Marcus, Nov 26 2015
-
PARI
a(n,p=prime(n))=sqrtint(4*p-8) \\ Charles R Greathouse IV, Jan 24 2018
-
Python
from math import isqrt from sympy import prime def A060019(n): return isqrt(prime(n)-2<<2) # Chai Wah Wu, Jun 06 2025
Formula
For n=1, prime(1) is 2, and a(n) = 0.
Extensions
Offset set to 1 by Michel Marcus, Nov 26 2015