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.

A302049 a(n) = 1 if n = prime(k)*prime(1+k) for some k, otherwise 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Apr 24 2018

Keywords

Comments

Characteristic function for products of 2 successive primes (A006094).

Crossrefs

Programs

  • PARI
    A302049(n) = if(n<=1,0,my(p=precprime(sqrtint(n))); p>1 && 0==(n%p) && isprime(n/p) && (nextprime(p+1)==n/p)); \\ After code in A006094
    
  • PARI
    first(n) = my(res = vector(n), p = 2); forprime(q = 3, , if(p * q > n, return(res)); res[p * q]++; p = q) \\ David A. Corneth, Apr 24 2018

Formula

a(n) = A137794(n) * A280710(n).
a(n) = A185013(A246277(n)) = A185013(A078898(n)).