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!)
A284203 Number of twin prime (A001097) divisors of n. 2
0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 2, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 0, 2, 1, 2, 1, 0, 1, 2, 1, 1, 2, 1, 1, 2, 0, 0, 1, 1, 1, 2, 1, 0, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 0, 2, 2, 0, 1, 1, 2, 1, 1, 1, 0, 2, 1, 2, 2, 0, 1, 1, 1, 0, 2, 2, 1, 2, 1, 0, 2, 2, 0, 2, 0, 2, 1, 0, 1, 2, 1, 1, 2, 1, 1, 3, 0, 1, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,15
LINKS
Eric Weisstein's World of Mathematics, Twin Primes.
FORMULA
G.f.: Sum_{k>=1} x^A001097(k)/(1 - x^A001097(k)).
a(A062729(n)) = 0. - Ilya Gutkovskiy, Apr 02 2017
From Amiram Eldar, Jun 03 2024: (Start)
a(A048599(n)) = n.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A065421 - 1/5 = 1.7021605... . (End)
EXAMPLE
--------------------------------------------
| n | divisors of n | twin prime | a(n) |
| | | divisors of n | |
|------------------------------------------
| 1 | {1} | {-} | 0 |
| 2 | {1, 2} | {-} | 0 |
| 3 | {1, 3} | {3} | 1 |
| 4 | {1, 2, 4} | {-} | 0 |
| 5 | {1, 5} | {5} | 1 |
| 6 | {1, 2, 3, 6} | {3} | 1 |
| 7 | {1, 7} | {7} | 1 |
| 8 | {1, 2, 4, 8} | {-} | 0 |
| 9 | {1, 3, 9} | {3} | 1 |
--------------------------------------------
MATHEMATICA
nmax = 110; Rest[CoefficientList[Series[Sum[Boole[PrimeQ[k] && (PrimeQ[k - 2] || PrimeQ[k + 2])] x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]]
Table[Length[Select[Divisors[n], PrimeQ[#] && (PrimeQ[# - 2] || PrimeQ[# + 2]) &]], {n, 110}]
PROG
(PARI) concat([0, 0], Vec(sum(k=1, 110, (isprime(k) && (isprime(k - 2) || isprime(k + 2)))* x^k/(1 - x^k)) + O(x^111))) \\ Indranil Ghosh, Mar 22 2017
(PARI) a(n) = sumdiv(n, d, isprime(d) && (isprime(d-2) || isprime(d+2))); \\ Amiram Eldar, Jun 03 2024
(Python)
from sympy import isprime, divisors
print([len([i for i in divisors(n) if isprime(i) and (isprime(i - 2) or isprime(i + 2))]) for n in range(1, 111)]) # Indranil Ghosh, Mar 22 2017
CROSSREFS
Cf. A048599 (positions of records).
Sequence in context: A282355 A199322 A351567 * A341594 A368774 A005087
KEYWORD
nonn,changed
AUTHOR
Ilya Gutkovskiy, Mar 22 2017
STATUS
approved

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 9 16:35 EDT 2024. Contains 373248 sequences. (Running on oeis4.)