[go: up one dir, main page]

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!)
A123914 a(n) = prime(n)^2 - prime(n^2). Commutator of (primes, squares) at n. 9

%I #53 Sep 08 2022 08:45:28

%S 2,2,2,-4,24,18,62,50,110,300,300,542,672,656,782,1190,1602,1578,2052,

%T 2300,2246,2780,3086,3710,4772,5150,5090,5442,5400,5772,8556,9000,

%U 10032,9980,12270,12174,13328,14520,15146,16430,17714,17660,20604,20502,21200

%N a(n) = prime(n)^2 - prime(n^2). Commutator of (primes, squares) at n.

%C a(4) = -4 is the only negative value. All values are even. Asymptotically a(n) ~ (n log n)^2 - (n^2) log (n^2) = (n^2)*(log n)^2 - 2*(n^2)*(log n) = (n^2)*((log n)^2 - 2*log n) = O((n^2)*(log n)^2) which is the same as the asymptotic of commutator [primes, triangular numbers] at n, or, for that matter, commutator [primes, k-tonal numbers] at n for any k > 2.

%C For pi(n^2) - pi(n)^2 see A291440. - _Jonathan Sondow_, Sep 10 2017

%C Proof that a(n) > 0 for n <> 4: It is known that pi(k^2) >= pi(k)^2 for k <> 7 (see A291440). Take k = prime(n) to get pi(prime(n)^2) >= pi(prime(n))^2 = n^2 for prime(n) <> 7 = prime(4). Thus for n <> 4 there are at least n^2 primes <= prime(n)^2, so prime(n^2) <= prime(n)^2, implying a(n) >= 0. But a prime cannot equal a square, so a(n) > 0 for n <> 4. - _Jonathan Sondow_, Nov 04 2017

%D See A324799 for references. - _N. J. A. Sloane_, Sep 11 2019

%H Seiichi Manyama, <a href="/A123914/b123914.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..500 from G. C. Greubel)

%F a(n) = A001248(n) - A011757(n).

%F a(n) = commutator [A000040, A000290] at n.

%F a(n) = square(prime(n)) - prime(square(n)).

%F a(n) = A000290(A000040(n)) - A000040(A000290(n)). [corrected by _Jonathan Sondow_, Sep 10 2017]

%e a(1) = prime(1)^2 - prime(1^2) = prime(1)^2 - prime(1^2) = 4 - 2 = 2.

%e a(2) = prime(2)^2 - prime(2^2) = prime(2)^2 - prime(2^2) = 9 - 7 = 2.

%e a(3) = prime(3)^2 - prime(3^2) = prime(3)^2 - prime(3^2) = 25 - 23 = 2.

%e a(4) = prime(4)^2 - prime(4^2) = prime(4)^2 - prime(4^2) = 49 - 53 = -4.

%e a(5) = prime(5)^2 - prime(5^2) = prime(5)^2 - prime(5^2) = 121 - 97 = 24.

%t f[n_] := Prime[n]^2 - Prime[n^2]; Array[f, 45] (* _Robert G. Wilson v_, Oct 29 2006 *)

%t Table[(Prime[n])^2 - Prime[n^2], {n,1,300}] (* _G. C. Greubel_, Sep 15 2015 *)

%o (Magma) [NthPrime(n)^2 - NthPrime(n^2): n in [1..60]]; // _Vincenzo Librandi_, Sep 16 2015

%o (PARI) vector(100, n, prime(n)^2 - prime(n^2)) \\ _Altug Alkan_, Oct 05 2015

%Y Cf. A000040, A000290, A001248, A011757, A262199, A291440.

%Y Main diagonal of A324799.

%K easy,sign

%O 1,1

%A _Jonathan Vos Post_, Oct 28 2006

%E More terms from _Robert G. Wilson v_, Oct 29 2006

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 August 30 05:37 EDT 2024. Contains 375526 sequences. (Running on oeis4.)