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!)
A305894 Filter sequence for a(Sophie Germain primes) = constant sequences. 1

%I #6 Jul 01 2018 08:35:31

%S 1,2,2,3,2,4,5,6,7,8,2,9,10,11,12,13,14,15,16,17,18,19,2,20,21,22,23,

%T 24,2,25,26,27,28,29,30,31,32,33,34,35,2,36,37,38,39,40,41,42,43,44,

%U 45,46,2,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,2,76,77,78,79,80,2,81

%N Filter sequence for a(Sophie Germain primes) = constant sequences.

%C For all i, j:

%C a(i) = a(j) => A305800(i) = A305800(j),

%C a(i) = a(j) => A305978(i) = A305978(j).

%H Antti Karttunen, <a href="/A305894/b305894.txt">Table of n, a(n) for n = 1..100000</a>

%F a(1) = 1; for n > 1, a(n) = 2 if A156660(n) == 1 [when n is in A005384 = 2, 3, 5, 11, 23, 29, 41, 53, 83, 89, 113, ...], otherwise a(n) = 1+n-A156874(n).

%o (PARI)

%o up_to = 100000;

%o A156660(n) = (isprime(n)&&isprime(2*n+1)); \\ From A156660

%o partialsums(f,up_to) = { my(v = vector(up_to), s=0); for(i=1,up_to,s += f(i); v[i] = s); (v); }

%o v156874 = partialsums(A156660, up_to);

%o A156874(n) = v156874[n];

%o A305894(n) = if(n<2,n,if(A156660(n),2,1+n-A156874(n)));

%Y Cf. A005384, A156660, A156874, A305800, A305810, A305978.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jul 01 2018

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 August 30 00:57 EDT 2024. Contains 375520 sequences. (Running on oeis4.)