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!)
A122257 Characteristic function of Pierpont primes (A005109). 4

%I #15 Oct 16 2021 13:06:04

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

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

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

%N Characteristic function of Pierpont primes (A005109).

%H Antti Karttunen, <a href="/A122257/b122257.txt">Table of n, a(n) for n = 1..65537</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PierpontPrime.html">Pierpont Prime</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F a(n) = A010051(n) * A065333(n-1).

%F a(n) = if (n is prime) and (n-1 is 3-smooth) then 1 else 0.

%F a(n) = if n=1 then 0 else A122258(n) - A122258(n-1);

%F a(A122259(n)) = 0, a(A005109(n)) = 1.

%t smooth3Q[n_] := n == 2^IntegerExponent[n, 2]*3^IntegerExponent[n, 3];

%t a[n_] := Boole[PrimeQ[n] && smooth3Q[n - 1]];

%t Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Oct 16 2021 *)

%o (Scheme)

%o (define (A122257 n) (if (= 1 n) 0 (if (= 1 (A065333 (- n 1))) (A010051 n) 0)))

%o (define (A065333 n) (if (= 1 (A038502 (A000265 n))) 1 0))

%o ;; _Antti Karttunen_, Dec 07 2017

%Y Cf. A005109, A010051, A065333, A122258 (partial sums).

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Aug 29 2006

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 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)