login
a(n) = prime(prime(n)) - n.
1

%I #17 Sep 08 2022 08:46:13

%S 2,3,8,13,26,35,52,59,74,99,116,145,166,177,196,225,260,265,312,333,

%T 346,379,408,437,484,521,536,559,570,587,678,707,740,763,824,841,882,

%U 929,952,991,1022,1045,1110,1127,1156,1171,1250,1361,1384,1397

%N a(n) = prime(prime(n)) - n.

%C Inspired by A014689.

%H Charles R Greathouse IV, <a href="/A262021/b262021.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A006450(n) - n.

%F a(n) ~ n log^2 n. - _Charles R Greathouse IV_, Sep 08 2015

%e For n = 1, a(n) = prime(prime(n)) - n = prime(prime(1)) - 1 = 2.

%t Table[Prime[Prime[n]] - n, {n, 50}] (* _Vincenzo Librandi_, Sep 09 2015 *)

%o (PARI)

%o a(n) = prime(prime(n)) - n;

%o vector(50, n, a(n))

%o (Magma) [NthPrime(NthPrime(n))-n: n in [1..50]]; // _Vincenzo Librandi_, Sep 09 2015

%Y Cf. A000027, A006450, A014689.

%K nonn,easy

%O 1,1

%A _Altug Alkan_, Sep 08 2015