|
|
A267012
|
|
Numbers n such that the n-th prime equals the n-th Ramanujan prime of the totient of n.
|
|
0
|
|
|
1, 10, 28, 50, 56, 874, 1575, 3604, 4966, 30704, 55964, 56372, 145616, 195016, 200792, 227278, 1679518, 2611874, 3028502, 23070602, 27365684, 45639626
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
28 is in the sequence because the totient of 28 is 12, the 12th Ramanujan prime is 107, and the 28th prime is also 107.
|
|
MATHEMATICA
|
lim = 60000; r = Table[0, {lim}]; s = 0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < lim, r[[s + 1]] = k], {k, Prime[3 lim]}]; r = r + 1; Select[Range@ lim, Prime@ # == r[[EulerPhi@ #]] &] (* Michael De Vlieger, Jan 09 2016, after T. D. Noe at A104272 *)
|
|
PROG
|
(Perl) use ntheory ":all"; sub is { my $n = shift; nth_prime($n) == nth_ramanujan_prime(euler_phi($n)); } for (1..1e5) { say if is($_) }
(Perl) use ntheory ":all"; my $lim = 1e7; my($pr, $rp) = (primes(nth_prime($lim)), ramanujan_primes(nth_ramanujan_prime($lim))); for (1..$lim) { say if $pr->[$_-1] == $rp->[euler_phi($_)-1]; } # high memory use but faster
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|