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!)
A074719 ip(n): the number of primes not exceeding reverse(n). 3

%I #9 Jan 04 2017 14:11:20

%S 0,1,2,2,3,3,4,4,4,0,5,8,11,13,15,18,20,22,24,1,5,8,11,13,15,18,20,22,

%T 24,2,6,9,11,14,16,18,21,23,24,2,6,9,11,14,16,18,21,23,24,3,6,9,11,14,

%U 16,18,21,23,24,3,6,9,11,14,16,18,21,23,24,4,7,9,12,15,16,19,21,23,25

%N ip(n): the number of primes not exceeding reverse(n).

%C "ip" is "pi" backwards.

%H Robert Israel, <a href="/A074719/b074719.txt">Table of n, a(n) for n = 1..10000</a>

%F ip(n) = pi(reverse(n)).

%e ip(12) = pi(21) = 8.

%p reverse:= proc(n) local L,d;

%p L:= convert(n,base,10);

%p add(10^(i-1)*L[-i],i=1..nops(L));

%p end proc:

%p map(numtheory:-pi @ reverse, [$1..100]); # _Robert Israel_, Jan 04 2017

%t rev[n_] := FromDigits[Reverse[IntegerDigits[n]]]; f[n_] := Module[{r, i}, r = 0; i = 1; While[Prime[i] <= n, i++ ]; i - 1]; Table[f[rev[n]], {n, 1, 100}]

%t PrimePi[FromDigits[Reverse[IntegerDigits[#]]]]&/@Range[80] (* _Harvey P. Dale_, May 28 2015 *)

%Y Cf. A000720, A004086.

%K base,easy,nonn,look

%O 1,3

%A _Joseph L. Pe_, Sep 27 2002

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 April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)