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.

Previous Showing 11-18 of 18 results.

A089827 Number of subsets of {1,.., n} containing no twin prime pairs.

Original entry on oeis.org

2, 4, 8, 16, 24, 48, 80, 160, 320, 640, 1280, 2560, 3840, 7680, 15360, 30720, 61440, 122880, 184320, 368640, 737280, 1474560, 2949120, 5898240, 11796480, 23592960, 47185920, 94371840, 188743680, 377487360, 566231040
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 12 2003

Keywords

Comments

a(n) = A000079(n) - A089828(n).

Crossrefs

Formula

a(n) = if n and n-2 are primes then (if n=7 then a(n-1)*5/3 else a(n-1)*3/2) else a(n-2)*2.

A089828 Number of subsets of {1,.., n} containing at least one twin prime pair.

Original entry on oeis.org

0, 0, 0, 0, 8, 16, 48, 96, 192, 384, 768, 1536, 4352, 8704, 17408, 34816, 69632, 139264, 339968, 679936, 1359872, 2719744, 5439488, 10878976, 21757952, 43515904, 87031808, 174063616, 348127232, 696254464, 1581252608
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 12 2003

Keywords

Comments

a(n) = A000079(n)-A089827(n).

Crossrefs

A071701 Number of twin prime pairs <= n of form (4*k+1,4*k+3), k>0.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 04 2002

Keywords

Comments

As for A071538 the convention is followed that a twin prime pair is <= n if its smaller member is <= n.

Examples

			a(30)=3, since (29,31) is included along with (5,7) and (17,19).
		

Crossrefs

a(n) = A071538(n) - A071702(n), cf. A071695, A071696.

A089881 Number of primes <= n that are members of twin prime pairs.

Original entry on oeis.org

0, 0, 0, 0, 2, 2, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 13 2003

Keywords

Comments

a(n) = if n<3 then 0 else (if n<7 then A071538(n-2)*2 else A071538(n-2)*2-1).

Examples

			a(30) = 7 = #{3,5,7,11,13,17,19}, as (3,5), (5,7), (11,13) and (17,19) are all twin prime pairs with members not greater than 30,
a(31) = 9 = #{3,5,7,11,13,17,19,29,31} with two more members for the next twin prime pair (29,31).
		

Crossrefs

A089882 Number of subsets of {1, ..., n} containing exactly one twin prime pair.

Original entry on oeis.org

0, 0, 0, 0, 8, 16, 32, 64, 128, 256, 512, 1024, 768, 1536, 3072, 6144, 12288, 24576, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 20971520, 41943040, 83886080, 167772160
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 13 2003

Keywords

Crossrefs

Formula

a(n) = ceiling(A089881(n)/2)*2^(n-A089881(n)).

A158288 The number of twin prime pairs in the n-th century.

Original entry on oeis.org

8, 7, 4, 2, 3, 2, 3, 0, 5, 0, 5, 1, 3, 2, 4, 0, 4, 2, 2, 3, 3, 3, 2, 3, 0, 2, 2, 3, 1, 1, 0, 2, 2, 4, 2, 4, 1, 1, 2, 2, 4, 2, 5, 1, 2, 2, 2, 2, 0, 2, 2, 0, 2, 0, 3, 2, 3, 1, 3, 0, 1, 2, 1, 1, 1, 2, 2, 4, 2, 2, 0, 1, 1, 3, 2, 3, 0, 1, 1, 1, 2, 0, 3, 1, 1, 2, 1, 0, 3, 1, 2, 0, 2, 1, 4, 0, 2, 2, 1, 1, 4, 1, 1, 2, 2
Offset: 1

Views

Author

Ki Punches, Mar 15 2009

Keywords

Comments

The number of members of A001359 from 100*n-99 to 100*n-3. - Robert Israel, Jul 19 2017

Crossrefs

Programs

  • Maple
    f:= proc(n) local P;
       P:= select(isprime, {seq(i,i=100*n-99..100*n-1,2)});
       nops(P intersect map(`+`,P,2))
    end proc:
    map(f, [$1..200]); # Robert Israel, Jul 19 2017
  • Mathematica
    Table[Count[Prime@ Range[Boole[n == 1] + PrimePi[100 (n - 1) + 1], PrimePi[100 n] - 1], ?(PrimeQ[# + 2] &)], {n, 105}] (* _Michael De Vlieger, Jul 20 2017 *)
  • PARI
    a(n)=my(s=0);forprime(p=100*n-99,100*n-2,if(isprime(p+2),s++));s \\ Charles R Greathouse IV, Feb 03 2011
    
  • Python
    from sympy import primerange, isprime
    def a(n):
        s=0
        for p in primerange(100*n - 99, 100*n - 1):
            if isprime(p + 2):s+=1
        return s
    print([a(n) for n in range(1, 201)]) # Indranil Ghosh, Jul 20 2017, after PARI code

Formula

a(n) = A071538(100*n-3) - A071538(100*n-100). - Robert Israel, Jul 19 2017

Extensions

Corrected by Ray Chandler, May 23 2009

A113609 Number of prime powers q<=n such that also q+2 is a prime power.

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 14 2006

Keywords

Comments

a(n) > A071538(n);
(25,27) is the smallest pair of prime powers (q,q+2) such that both q and q+2 are not primes, conjecture: there are more (but not < 10^6).

Examples

			a(10) = Card{(p^0,3), (2,2^2), (3,5), (5,7), (7,3^2), (3^2,11)} = 6.
		

Crossrefs

Programs

  • PARI
    ispp(n) = (n==1) || isprimepower(n);
    a(n) = sum(k=1, n, ispp(k) && ispp(k+2)); \\ Michel Marcus, Jun 24 2019

A344117 Number of twin prime pairs in the range (6*n + 1, 6*(n + m) + 1], where m is the number of twin prime pairs, 6*k +- 1 for k = 1, 2, ..., n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 3, 3, 4, 4, 3, 3, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5
Offset: 1

Views

Author

Ya-Ping Lu, Jun 24 2021

Keywords

Comments

Conjecture: a(n) >= 1.

Crossrefs

Programs

  • Python
    from sympy import isprime
    def istwin(m): return 1 if isprime(6*m-1)*isprime(6*m+1) == 1 else 0
    ct1 = 0
    for n in range(1, 100):
        ct1 += istwin(n); ct = 0
        for m in range (n + 1, n + ct1 + 1): ct += istwin(m)
        print(ct)
Previous Showing 11-18 of 18 results.