cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A122261 Characteristic function of numbers having only factors that are Pierpont primes.

This page as a plain text file.
%I A122261 #22 Feb 16 2025 08:33:02
%S A122261 1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,0,1,0,1,0,1,
%T A122261 1,1,1,1,1,1,0,1,0,0,1,0,0,1,1,1,1,1,0,1,0,1,1,0,0,1,0,0,1,1,1,0,0,1,
%U A122261 0,1,0,1,1,1,1,1,0,1,0,1,1,0,0,1,1,0,0,0,0,1,1,0,0,0,1,1,1,1,0,1,0,1,0,1,1
%N A122261 Characteristic function of numbers having only factors that are Pierpont primes.
%H A122261 Antti Karttunen, <a href="/A122261/b122261.txt">Table of n, a(n) for n = 1..12289</a>
%H A122261 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PierpontPrime.html">Pierpont Prime</a>
%H A122261 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F A122261 Multiplicative with a(p) = A065333(p-1), for p prime.
%F A122261 a(n) = if n=1 then 0 else A122262(n) - A122262(n-1).
%F A122261 a(A122260(n)) = 1.
%F A122261 a(n) = A122255(n) for n < 25.
%e A122261 For n = 11 = 11^1, 11 is not a Pierpoint prime because 11-1 = 10 = 2*5 has a prime factor larger than 3, thus a(11) = 0.
%e A122261 For n = 25 = 5^2, 5 is a Pierpoint prime as 5-1 = 4 = 2^2 does not have any prime factors larger than 3, thus a(25) = 1.
%t A122261 Block[{nn = 105, s}, s = Select[Sort@ Flatten@ Table[2^i*3^j + 1, {i, 0, Log2@ nn}, {j, 0, Log[3, nn/2^i]}] , PrimeQ]; Table[Boole[n == 1] + Boole@ AllTrue[FactorInteger[n][[All, 1]], MemberQ[s, #] &], {n, nn}]] (* _Michael De Vlieger_, Aug 23 2017, after _Robert G. Wilson v_ at A005109 *)
%o A122261 (PARI)
%o A122261 A065333(n) = ((3^valuation(n, 3)<<valuation(n, 2))==n); \\ This function from _Charles R Greathouse IV_, Aug 21 2011
%o A122261 A122261(n) = factorback(apply(p -> A065333(p-1), (factor(n)[, 1]))); \\ _Antti Karttunen_, Aug 22 2017
%Y A122261 Cf. A005109, A065333, A122255, A122262 (partial sums).
%Y A122261 Characteristic function of A122260.
%K A122261 nonn,mult
%O A122261 1,1
%A A122261 _Reinhard Zumkeller_, Aug 29 2006
%E A122261 An unnecessary part removed from the formula and the Example section added by _Antti Karttunen_, Aug 22 2017