A046883
Automorphic primes: primes p such that p is k-th prime and p ends in k.
Original entry on oeis.org
17, 99551, 4303027, 6440999, 14968819, 95517973, 527737957, 1893230839, 1246492090901, 12426836115943, 21732382677641, 154895576080181, 2677628540590583, 133475456543097857, 820396537622790811
Offset: 1
p(7)=17, p(9551)=99551, p(303027)=4303027, p(440999)=6440999, p(968819)=14968819, p(5517973)=95517973.
-
Do[ If[ Mod[ Prime[n], 10^Ceiling[ Log[10, n]]] == n, Print[Prime[n]]], {n, 1, 100000000, 2}] (* Robert G. Wilson v, May 21 2004 *) (* fixed by Ivan N. Ianakiev, Apr 15 2022 *)
fQ[n_]:=StringPosition[ToString[Prime[n]],ToString[n]][[1,2]]==
IntegerLength[Prime[n]]; Prime[Select[Range[1,5517973,2],fQ]]//Quiet (* Ivan N. Ianakiev, Apr 15 2022 *)
Select[Table[{n,Prime[n]},{n,552*10^4}],Mod[#[[2]],10^IntegerLength[#[[1]]]]==#[[1]]&][[;;,2]] (* The program generates the first six terms of the sequence. *) (* Harvey P. Dale, Mar 18 2025 *)
A075902
Primes p = prime(k) such that the decimal representation of p contains k as a substring.
Original entry on oeis.org
17, 64553, 64567, 64577, 64591, 64601, 64661, 99551, 4303027, 6440999, 14968819, 95517973, 527737957, 1893230839, 1966640443, 1246492090901
Offset: 1
Pairs {n, prime(n)}: {7, 17}, {6455, 64553}, {6456, 64567}, {6457, 64577}, {6459, 64591}, {6460, 64601}, {6466, 64661}, {9551, 99551}, {303027, 4303027}, {440999, 6440999}, {968819, 14968819}, {5517973, 95517973}.
-
Prime[Select[Range[10^6], StringContainsQ[ToString[Prime[#]], ToString[#]] & ]] (* Robert Price, May 27 2019 *)
-
from sympy import primerange
[print(i,end=', ') for n,i in enumerate(primerange(1,10**7)) if str(n+1) in str(i)] # Nicholas Stefan Georgescu, Jan 03 2025
A068575
Numbers n such that, as strings, n is a substring of prime(n).
Original entry on oeis.org
7, 6455, 6456, 6457, 6459, 6460, 6466, 9551, 303027, 440999, 968819, 5517973, 27737957, 93230839, 96664044, 46492090901
Offset: 1
Treated as strings, 6455 is a substring of 64553 = Prime(6455), so 6455 belongs to the sequence.
Pairs {n, prime(n)}: {7, 17}, {6455, 64553}, {6456, 64567}, {6457, 64577}, {6459, 64591}, {6460, 64601}, {6466, 64661}, {9551, 99551}, {303027, 4303027}, {440999, 6440999}, {968819, 14968819}, {5517973, 95517973}.
-
Select[Range[10^6], StringPosition[ToString[Prime[ # ]], ToString[ # ]] != {} &]
Select[Range[97*10^4],SequenceCount[IntegerDigits[Prime[#]],IntegerDigits[#]]>0&] (* The program generates the first 11 terms of the sequence. *) (* Harvey P. Dale, Nov 14 2022 *)
A306572
Numbers k whose decimal representation ends with that of pi(k) (where pi denotes the prime counting function A000720).
Original entry on oeis.org
16, 17, 132, 254, 374, 494, 1196, 2348, 3487, 4624, 5757, 6886, 11373, 22517, 33597, 44639, 55646, 66644, 77629, 88580, 99550, 99551, 110486, 219572, 328268, 436699, 544946, 653052, 761059, 869024, 976855, 1084604, 1192399, 2159962, 3232398, 4303026, 4303027
Offset: 1
There are 7 prime numbers <= 17, and 17 ends with 7, hence 17 is a term.
There are 13 prime numbers <= 42, and 42 does not end with 13, hence 42 is not a term.
-
Select[Range[2, 10^6], Mod[#1, 10^(1 + Floor@ Log10[#2])] == #2 & @@ {#, PrimePi@ #} &] (* Michael De Vlieger, Apr 06 2021 *)
-
pi=0; for (n=1, 4303027, if (n%10^max(1,#digits(pi+=isprime(n)))==pi, print1 (n ", ")))
-
from sympy import primepi
A306572_list = [n for n, p in enumerate(primepi(k) for k in range(10**4)) if n > 0 and n % 10**len(str(p)) == p] # Chai Wah Wu, Apr 06 2021
A236469
Primes p such that pi(p) = floor(p/10), where pi is the prime counting function.
Original entry on oeis.org
64553, 64567, 64577, 64591, 64601, 64661
Offset: 1
-
KD := proc() local a,b; a:=ithprime(n); b:=floor(a/10); if n=b then RETURN (a);fi; end: seq(KD(), n=1..1000000);
-
Do[p = Prime[n]; k = Floor[p/10]; If[k == n, Print[p]], {n, 10^6}] (* Bajpai *)
Select[Prime[Range[6500]], PrimePi[#] == Floor[#/10] &] (* Alonso del Arte, Jan 26 2014 *)
Showing 1-5 of 5 results.
Comments