The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A069845 Number of distinct primes obtained by inserting a 4 at all possible places in n. This includes prefixing. 10

%I #8 Aug 24 2019 11:52:55

%S 1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,1,0,1,0,

%T 0,0,1,0,2,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,2,0,0,0,2,0,2,0,0,0,2,0,

%U 0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,0,0,1,0,1,0,0,0,0,0,0

%N Number of distinct primes obtained by inserting a 4 at all possible places in n. This includes prefixing.

%H Antti Karttunen, <a href="/A069845/b069845.txt">Table of n, a(n) for n = 1..20000</a>

%e See the example in A069842.

%t Table[ Count[ PrimeQ[ Union[ FromDigits /@ Table[ Insert[ IntegerDigits[n], 4, j], {j, 1, Floor[ Log[10, n] + 2]}]]], True], {n, 1, 105}]

%o (PARI) A069845(n) = { my(digs=digits(n), u=#digs, nums=Set([])); for(n=1,1+u, nums = setunion(nums,[fromdigits(vector(1+u,i,if(i<n,digs[i],if(i>n,digs[i-1],4))))])); #select(isprime,nums); }; \\ _Antti Karttunen_, Aug 23 2019

%Y Cf. A069842, A069843, A069844, A069846, A069847, A069848, A069849, A069850 and A069851.

%K base,nonn

%O 1,19

%A _Amarnath Murthy_, Apr 16 2002

%E Edited and extended by _Robert G. Wilson v_, Apr 18 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 June 5 07:08 EDT 2024. Contains 373102 sequences. (Running on oeis4.)