A000430 Primes and squares of primes.
2, 3, 4, 5, 7, 9, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223
Offset: 1
References
- F. Smarandache, Definitions solved and unsolved problems, conjectures and theorems in number theory and geometry, edited by M. Perez, Xiquan Publishing House 2000
- F. Smarandache, Sequences of Numbers Involved in Unsolved Problems, Hexis, Phoenix, 2006.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
- William Chau, The tau, sigma, rho functions, and some related numbers, Pi Mu Epsilon Journal, Vol. 11, No. 10 (Spring 2004), pp. 519-534; entire issue.
- F. Smarandache, Sequences of Numbers Involved in Unsolved Problems.
Crossrefs
Programs
-
Haskell
a000430 n = a000430_list !! (n-1) a000430_list = m a000040_list a001248_list where m (x:xs) (y:ys) | x < y = x : m xs (y:ys) | x > y = y : m (x:xs) ys -- Reinhard Zumkeller, Sep 23 2011
-
Mathematica
nn = 223; t = Union[Prime[Range[PrimePi[nn]]], Prime[Range[PrimePi[Sqrt[nn]]]]^2] (* T. D. Noe, Apr 11 2011 *) Module[{upto=250,prs},prs=Prime[Range[PrimePi[upto]]];Select[Join[ prs,prs^2], #<=upto&]]//Sort (* Harvey P. Dale, Oct 08 2016 *)
-
PARI
is(n)=isprime(n) || (issquare(n,&n) && isprime(n)) \\ Charles R Greathouse IV, Sep 04 2013
-
Python
from math import isqrt from sympy import primepi def A000430(n): def f(x): return n+x-primepi(x)-primepi(isqrt(x)) m, k = n, f(n) while m != k: m, k = k, f(k) return int(m) # Chai Wah Wu, Aug 09 2024
Formula
A109810(a(n)) = 2. - Reinhard Zumkeller, May 24 2010
A056595(a(n)) = 1. - Reinhard Zumkeller, Aug 15 2011
The number of terms not exceeding x is N(x) ~ (x + 2*sqrt(x))/log(x) (Chau, 2004). - Amiram Eldar, Jun 29 2022
Comments