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-14 of 14 results.

A205171 The lesser of twin primes == 1 (mod 8).

Original entry on oeis.org

17, 41, 137, 281, 521, 569, 617, 641, 809, 857, 881, 1049, 1289, 1481, 1697, 1721, 2081, 2129, 2657, 2729, 2801, 2969, 3257, 3329, 3929, 4001, 4049, 4217, 4241, 4337, 4481, 4649, 4721, 5009, 5417, 5441, 5657, 5849, 6089, 6449, 6569, 6689, 6761, 7457
Offset: 1

Views

Author

Robert G. Wilson v, Jan 22 2012

Keywords

Crossrefs

Intersection of A017077 and A001359.

Programs

  • Mathematica
    Select[ Prime@ Range@ 1000, Mod[#, 8] == 1 && PrimeQ[# + 2] &]

A074381 (p-1)/2 mod 2, where p is the n-th prime for which p+2 is also prime; i.e., a(n)=0 if p==1 (mod 4), a(n)=1 if p==3 (mod 4).

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1
Offset: 1

Views

Author

Roger L. Bagula, Sep 24 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Mod[(Select[Prime/@Range[600], PrimeQ[ #+2]&]-1)/2, 2]

Extensions

Edited by Dean Hickerson and Robert G. Wilson v, Oct 09 2002

A074396 a(n) = 10 - (p mod 10), where p is the n-th prime congruent to 1 (mod 4) for which p+2 is also prime.

Original entry on oeis.org

5, 3, 1, 9, 9, 3, 1, 3, 1, 9, 9, 9, 1, 3, 9, 1, 9, 3, 9, 1, 9, 1, 3, 1, 9, 9, 3, 9, 3, 1, 3, 9, 1, 9, 3, 1, 9, 1, 3, 1, 1, 9, 1, 3, 1, 1, 9, 3, 9, 9, 3, 1, 9, 1, 3, 3, 1, 9, 3, 9, 9, 3, 3, 1, 9, 1, 9, 3, 9, 3, 9, 3, 9, 1, 1, 3, 1, 1, 1, 1, 9, 9, 1, 1, 3, 1, 3, 3, 1, 1, 1, 3, 3, 3, 9, 1, 9, 9, 9, 3, 9, 1, 3, 3, 1
Offset: 1

Views

Author

Roger L. Bagula, Sep 24 2002

Keywords

Examples

			The first 5 such primes are 5, 17, 29, 41, 101. For these, 10 - (p mod 10) is 5, 3, 1, 9, 9.
		

Crossrefs

Cf. A071695.

Programs

  • Mathematica
    10-Mod[ #, 10]&/@Select[Prime/@Range[1500], PrimeQ[ #+2]&&Mod[ #, 4]==1&]

Extensions

Edited by Dean Hickerson, Oct 09 2002

A379750 First prime of cousin prime pairs which differ, in their binary representation, by a single bit.

Original entry on oeis.org

3, 19, 43, 67, 97, 163, 193, 307, 313, 379, 457, 499, 643, 673, 739, 769, 859, 883, 907, 937, 1009, 1297, 1483, 1489, 1579, 1609, 1867, 1873, 1993, 2083, 2137, 2203, 2347, 2377, 2473, 2539, 2617, 2659, 2683, 2689, 2707, 2833, 2857, 2953, 3019, 3163, 3187, 3217
Offset: 1

Views

Author

James S. DeArmon, Jan 01 2025

Keywords

Comments

The first prime of a cousin prime pair is a prime p for which p+4 is also prime.
The only way for p and p+4 to differ at a single bit position is when p has a 0 bit at its "4" position, so p == {0,1,2,3} (mod 8), and so this sequence is the intersection of A023200 and A047471.

Examples

			3 is a term since it's a cousin prime with 7 and their respective binary representations 011 and 111 differ at a single bit position.
13 is not a term since, although it's a cousin prime with 17, their respective binary representations 1101 and 10001 differ at more than a single bit position.
		

Crossrefs

Cf. A023200 (cousin primes), A047471, A071695.

Programs

  • Mathematica
    Select[Prime[Range[480]], PrimeQ[#+4]&&Mod[#,8]<4&] (* James C. McMahon, Mar 01 2025 *)
  • Python
    import sympy
    def ok(n): return (n&5)==1 and sympy.isprime(n) and sympy.isprime(n+4)

Extensions

a(45)-a(48) from James C. McMahon, Mar 01 2025
Previous Showing 11-14 of 14 results.