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-20 of 43 results. Next

A124065 Numbers k such that 8*k - 1 and 8*k + 1 are twin primes.

Original entry on oeis.org

9, 24, 30, 39, 54, 75, 129, 144, 165, 186, 201, 234, 261, 264, 324, 336, 339, 375, 390, 396, 420, 441, 459, 471, 516, 534, 600, 621, 654, 660, 690, 705, 735, 795, 819, 849, 870, 891, 936, 945, 1011, 1029, 1125, 1155, 1179, 1215, 1221, 1251, 1284, 1395, 1419
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Examples

			9 is in the sequence since 8*9 - 1 = 71 and 8*9 + 1 = 73 are twin primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..2000] | IsPrime(8*n+1) and IsPrime(8*n-1)] // Vincenzo Librandi, Mar 08 2010
    
  • Mathematica
    Select[Range[1500], And @@ PrimeQ[{-1, 1} + 8# ] &] (* Ray Chandler, Nov 16 2006 *)
  • Python
    from sympy import isprime
    def ok(n): return isprime(8*n - 1) and isprime(8*n + 1)
    print(list(filter(ok, range(1420)))) # Michael S. Branicky, Sep 24 2021

Extensions

Extended by Ray Chandler, Nov 16 2006

A088763 a(n) = A087695(n)/2.

Original entry on oeis.org

4, 5, 7, 8, 10, 13, 17, 20, 22, 25, 28, 32, 35, 38, 43, 50, 52, 53, 55, 67, 77, 80, 85, 88, 97, 98, 113, 115, 118, 127, 130, 133, 137, 140, 155, 157, 167, 175, 178, 185, 188, 193, 218, 223, 230, 232, 253, 272, 280, 283, 287, 295, 298, 302, 305, 308, 322, 325, 328, 340
Offset: 1

Views

Author

Ray Chandler, Oct 26 2003

Keywords

Comments

A260689(a(n),1) = A264526(a(n)) = 3. - Reinhard Zumkeller, Nov 17 2015

Crossrefs

Programs

  • Haskell
    a088763 = flip div 2 . a087695  -- Reinhard Zumkeller, Nov 17 2015
  • Maple
    ZL:=[]:for p from 1 to 700 do if (isprime(p) and isprime(p+6) ) then ZL:=[op(ZL),(p+(p+6))/4]; fi; od; print(ZL); # Zerinvary Lajos, Mar 07 2007
  • Mathematica
    f[n_]:=PrimeQ[n-3]&&PrimeQ[n+3]; lst={};Do[If[f[n],AppendTo[lst,n]],{n,2,8!,2}];lst/2 (* Vladimir Joseph Stephan Orlovsky, Oct 09 2009 *)

Extensions

Offset corrected by Reinhard Zumkeller, Nov 17 2015

A088765 a(n) = A087696(n)/2.

Original entry on oeis.org

4, 6, 9, 12, 18, 21, 24, 33, 39, 42, 51, 54, 66, 72, 81, 84, 93, 114, 117, 123, 138, 144, 156, 171, 177, 189, 192, 207, 213, 219, 222, 231, 252, 276, 291, 306, 318, 324, 339, 348, 357, 369, 378, 396, 408, 417, 429, 441, 462, 471, 486, 507, 513, 522, 528, 546
Offset: 1

Views

Author

Ray Chandler, Oct 26 2003

Keywords

Comments

"Example 3: Ordinary twins 2a +- 1 for a = 2, 3, 6, 9, 15, . . . have D = 1 and are in class I. For D = 3, the twins 2a +- 3 occur for a = 4, 5, 7, 8, 10"; the latter is this sequence, from p. 3 of Weber. - Jonathan Vos Post, Feb 14 2011

Crossrefs

Programs

  • Magma
    [n/2: n in [3..2000] |IsPrime(n+5) and IsPrime(n-5)]; // Vincenzo Librandi, May 20 2017
  • Mathematica
    Select[Range[3, 2000], PrimeQ[# + 5] && PrimeQ[# - 5] &] / 2 (* Vincenzo Librandi, May 20 2017 *)

Extensions

Offset changed from 0 to 1 by Vincenzo Librandi, May 21 2017

A104278 Numbers m such that 2m+1 and 2m-1 are not primes.

Original entry on oeis.org

13, 17, 25, 28, 32, 38, 43, 46, 47, 58, 59, 60, 61, 62, 67, 71, 72, 73, 77, 80, 85, 88, 92, 93, 94, 101, 102, 103, 104, 107, 108, 109, 110, 118, 122, 123, 124, 127, 130, 133, 137, 143, 144, 145, 148, 149, 150, 151, 152, 160, 161, 162, 163, 164, 167, 170, 171, 172
Offset: 1

Views

Author

Alexandre Wajnberg, Apr 17 2005

Keywords

Comments

Complement of A147820. - Omar E. Pol, Nov 17 2008
m is in the sequence iff A177961(m)Vladimir Shevelev, May 16 2010

Examples

			a(1)=13 is the first number satisfying simultaneously the two rules.
		

Crossrefs

Intersection of A047845 and A104275.

Programs

  • Haskell
    a104278 n = a104278_list !! (n-1)
    a104278_list = [m | m <- [1..],
                        a010051' (2 * m - 1) == 0 && a010051' (2 * m + 1) == 0]
    -- Reinhard Zumkeller, Aug 04 2015
    
  • Mathematica
    Select[ Range[300], !PrimeQ[2# + 1] && !PrimeQ[2# - 1] &] (* Robert G. Wilson v, Apr 18 2005 *)
    Select[Range[300],NoneTrue[2#+{1,-1},PrimeQ]&] (* The program uses the NoneTrue function from Mathematica version 10 *)  (* Harvey P. Dale, Jul 07 2015 *)
  • PARI
    select( {is_A104278(n)=!isprime(2*n-1)&&!isprime(2*n+1)}, [1..222]) \\ M. F. Hasler, Apr 29 2024

Formula

a(n) = (A025583-1)/2. - Bill McEachen, Feb 05 2025

Extensions

More terms from Robert G. Wilson v, Apr 18 2005

A066466 Numbers having just one anti-divisor.

Original entry on oeis.org

3, 4, 6, 96, 393216
Offset: 1

Views

Author

Robert G. Wilson v, Jan 02 2002

Keywords

Comments

See A066272 for definition of anti-divisor.
Jon Perry calls these anti-primes.
A066272(a(n)) = 1.
From Max Alekseyev, Jul 23 2007; updated Jun 25 2025: (Start)
Except for a(2) = 4, the terms of A066466 have form 2^k*p where p is odd prime and both 2^(k+1)*p-1, 2^(k+1)*p+1 are prime (i.e., twin primes). In other words, this sequence, omitting 4, is a subsequence of A040040 containing elements of the form 2^k*p with prime p.
Furthermore, since 2^(k+1)*p-1, 2^(k+1)*p+1 must equal -1 and +1 modulo 3, the number 2^(k+1)*p must be 0 modulo 3, implying that p=3. Therefore every term, except 4, must be of the form 3*2^k such that 3*2^(k+1)-1, 3*2^(k+1)+1 are twin primes. In other words, k+1 belongs to the intersection of A002253 and A002235.
According to Ballinger and Keller's lists, there are no other such k up to 22*10^6. Therefore a(6) (if it exists) is greater than 3*2^(22*10^6) ~= 10^6622660. (End)
From Daniel Forgues, Nov 23 2009: (Start)
The 2 last known anti-primes seem to relate to the Fermat primes (coincidence?):
96 = 3 * 2^5 = 3 * 2^F_1 = 3 * 2^[2^(2^1) + 1] and
393216 = 3 * 2^17 = 3 * 2^F_2 = 3 * 2^[2^(2^2) + 1],
where F_k is the k-th Fermat prime. (End)

Crossrefs

Programs

  • Mathematica
    antid[n_] := Select[ Union[ Join[ Select[ Divisors[2n - 1], OddQ[ # ] && # != 1 & ], Select[ Divisors[2n + 1], OddQ[ # ] && # != 1 & ], 2n/Select[ Divisors[ 2n], OddQ[ # ] && # != 1 &]]], # < n & ]; Select[ Range[10^5], Length[ antid[ # ]] == 1 & ]

Extensions

Edited by Max Alekseyev, Oct 13 2009

A111046 Difference between squares of twin prime pairs.

Original entry on oeis.org

16, 24, 48, 72, 120, 168, 240, 288, 408, 432, 552, 600, 720, 768, 792, 912, 960, 1080, 1128, 1248, 1392, 1680, 1728, 1848, 2088, 2280, 2400, 2472, 2568, 2640, 3240, 3288, 3312, 3432, 3528, 4080, 4128, 4200, 4248, 4368, 4608, 4920, 5112, 5160, 5208, 5280
Offset: 1

Views

Author

Giovanni Teofilatto, Oct 06 2005

Keywords

Comments

Except for the first term 16 = 4^2, a(n) is never a square.

Crossrefs

Programs

  • Haskell
    a111046 = (* 2) . a054735  -- Reinhard Zumkeller, Feb 10 2015
  • Maple
    ZL:=[]:for p from 1 to 1400 do if (isprime(p) and isprime(p+2)) then ZL:=[op(ZL),(((p+2)^2)-p^2)]; fi; od; print(ZL); # Zerinvary Lajos, Mar 08 2007
  • Mathematica
    Select[Table[Prime[n] + 1, {n, 220}], PrimeQ[ # + 1] &] *4 (* Ray Chandler, Oct 12 2005 *)
    4+4#&/@Select[Partition[Prime[Range[300]],2,1],#[[2]]-#[[1]]==2&] [[All,1]] (* Harvey P. Dale, Apr 12 2018 *)

Formula

a(n) = A006512(n)^2 - A001359(n)^2 = A108604(n) - A108570(n) = 2*A054735(n) = 4*A014574(n) = 8*A040040(n).

Extensions

Edited and extended by Ray Chandler, Oct 12 2005

A260689 Table read by rows: numbers m such that (2*n-m, 2*n+m) is a prime pair.

Original entry on oeis.org

1, 1, 3, 5, 3, 7, 1, 5, 7, 3, 9, 3, 13, 1, 5, 11, 13, 3, 9, 17, 9, 15, 19, 5, 7, 13, 17, 19, 3, 15, 21, 9, 15, 25, 1, 7, 11, 13, 17, 23, 9, 15, 21, 27, 29, 3, 27, 5, 7, 17, 23, 25, 31, 9, 15, 21, 33, 35, 3, 21, 27, 33, 1, 5, 11, 19, 25, 29, 31, 37, 3, 15, 27
Offset: 2

Views

Author

Reinhard Zumkeller, Nov 17 2015

Keywords

Comments

1 <= T(n,k) <= 2*n-3; T(n,2) > 3 for n > 3; all terms are odd;
A264526(n) = T(n,1);
A264527(n) = T(n,A069360(n));
T(A040040(n),1) = 1;
T(A088763(n),1) = 3.

Examples

			.   n | T(n,k)          | (2*n-T(n,k), 2*n+T(n,k))       k=1..A069360(n)
. ----+-----------------+-----------------------------------------------
.   2 | 1               | (3,5)
.   3 | 1               | (5,7)
.   4 | 3,5             | (5,11) (3,13)
.   5 | 3,7             | (7,13) (3,17)
.   6 | 1,5,7           | (11,13) (7,17) (5,19)
.   7 | 3,9             | (11,17) (5,23)
.   8 | 3,13            | (13,19) (3,29)
.   9 | 1,5,11,13       | (17,19) (13,23) (7,29) (5,31)
.  10 | 3,9,17          | (17,23) (11,29) (3,37)
.  11 | 9,15,19         | (13,31) (7,37) (3,41)
.  12 | 5,7,13,17,19    | (19,29) (17,31) (11,37) (7,41) (5,43)
.  13 | 3,15,21         | (23,29) (11,41) (5,47)
.  14 | 9,15,25         | (19,37) (13,43) (3,53)
.  15 | 1,7,11,13,17,23 | (29,31) (23,37) (19,41) (17,43) (13,47) (7,53)
.  16 | 9,15,21,27,29   | (23,41) (17,47) (11,53) (5,59) (3,61)
.  17 | 3,27            | (31,37) (7,61)
.  18 | 5,7,17,23,25,31 | (31,41) (29,43) (19,53) (13,59) (11,61) (5,67)
.  19 | 9,15,21,33,35   | (29,47) (23,53) (17,59) (5,71) (3,73)
.  20 | 3,21,27,33      | (37,43) (19,61) (13,67) (7,73) .
		

Crossrefs

Cf. A069360 (row lengths), A010051, A264526, A264527.

Programs

  • Haskell
    a260689 n k = a260689_tabf !! (n-2) !! (k-1)
    a260689_row n = [m | m <- [1, 3 .. 2 * n - 3],
                         a010051' (2*n + m) == 1, a010051' (2*n - m) == 1]
    a260689_tabf = map a260689_row [2..]

A088769 a(n) = A087678(n)/2.

Original entry on oeis.org

7, 10, 11, 14, 16, 19, 25, 26, 31, 35, 40, 44, 46, 49, 59, 61, 70, 74, 79, 86, 91, 94, 95, 101, 110, 116, 121, 124, 130, 136, 151, 161, 170, 179, 194, 196, 205, 215, 220, 224, 226, 229, 235, 250, 256, 266, 289, 304, 305, 311, 325, 326, 334, 341, 346, 350, 355
Offset: 1

Views

Author

Ray Chandler, Oct 26 2003

Keywords

Crossrefs

Programs

  • Magma
    [n/2: n in [5..1500] |IsPrime(n+9) and IsPrime(n-9)]; // Vincenzo Librandi, May 22 2017
  • Mathematica
    Select[Range[5, 2000], PrimeQ[# + 9] && PrimeQ[# - 9] &] / 2 (* Vincenzo Librandi, May 21 2017 *)

A264526 Smallest number m such that both 2*n-m and 2*n+m are primes.

Original entry on oeis.org

1, 1, 3, 3, 1, 3, 3, 1, 3, 9, 5, 3, 9, 1, 9, 3, 5, 9, 3, 1, 3, 15, 5, 3, 9, 7, 3, 15, 1, 9, 3, 5, 15, 3, 1, 15, 3, 5, 9, 15, 5, 3, 9, 7, 9, 15, 7, 9, 3, 1, 3, 3, 1, 3, 15, 13, 15, 9, 7, 9, 15, 13, 21, 21, 5, 3, 27, 1, 9, 15, 5, 33, 9, 1, 15, 3, 7, 9, 3, 5
Offset: 2

Views

Author

Reinhard Zumkeller, Nov 17 2015

Keywords

Crossrefs

Programs

  • Haskell
    a264526 = head . a260689_row
    
  • Mathematica
    snm[n_]:=Module[{m=1},While[!PrimeQ[2n-m]||!PrimeQ[2n+m],m=m+2];m]; Array[ snm,90,2] (* Harvey P. Dale, Aug 13 2017, optimized by Ivan N. Ianakiev, Mar 16 2018 *)
  • PARI
    a(n) = {my(m=1); while(!(isprime(2*n-m) && isprime(2*n+m)), m+=2); m;} \\ Michel Marcus, Mar 18 2018

Formula

a(n) = A260689(n,1);
a(A040040(n)) = 1;
a(A014574(n)/2) = 1;
a(A088763(n)) = 3.
a(n) = A082467(2n). - Ivan N. Ianakiev, Oct 27 2021

A088767 a(n) = A087697(n)/2.

Original entry on oeis.org

5, 6, 12, 15, 18, 27, 30, 33, 45, 48, 60, 72, 78, 87, 93, 102, 117, 132, 135, 138, 150, 162, 180, 183, 195, 213, 225, 228, 258, 282, 285, 297, 300, 303, 312, 327, 333, 342, 363, 375, 390, 402, 408, 423, 435, 480, 492, 495, 513, 528, 555, 558, 597, 612, 615, 642
Offset: 1

Views

Author

Ray Chandler, Oct 26 2003

Keywords

Comments

Numbers n such that 2*n-7 [A089192] and 2*n+7 [A105760] are both prime. [Vincenzo Librandi, Jul 10 2010]

Crossrefs

Previous Showing 11-20 of 43 results. Next