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

A124520 Numbers k such that 14*k - 1 and 14*k + 1 are twin primes.

Original entry on oeis.org

3, 30, 33, 63, 75, 78, 93, 102, 123, 138, 153, 162, 165, 192, 195, 240, 252, 273, 297, 303, 342, 387, 393, 420, 435, 438, 450, 468, 483, 522, 525, 540, 588, 630, 633, 660, 663, 717, 738, 747, 750, 765, 798, 825, 837, 855, 957, 978, 993, 1023, 1032, 1062
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Examples

			3 is in the sequence since 14*3 - 1 = 41 and 14*3 + 1 = 43 are twin primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1100], And @@ PrimeQ[{-1, 1} + 14# ] &] (* Ray Chandler, Nov 16 2006 *)

Extensions

Extended by Ray Chandler, Nov 16 2006

A124521 Numbers k such that 16*k - 1 and 16*k + 1 are twin primes.

Original entry on oeis.org

12, 15, 27, 72, 93, 117, 132, 162, 168, 195, 198, 210, 258, 267, 300, 327, 330, 345, 435, 468, 642, 765, 813, 855, 903, 912, 960, 978, 993, 1128, 1143, 1182, 1290, 1350, 1353, 1365, 1392, 1398, 1440, 1632, 1680, 1713, 1737, 1797, 1848, 1860, 1947, 1953, 1962
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Examples

			12 is in the sequence since 16*12 - 1 = 191 and 16*12 + 1 = 193 are twin primes.
		

Crossrefs

Programs

  • Maple
    A124521:=n->`if`(isprime(16*n-1) and isprime(16*n+1), n, NULL): seq(A124521(n), n=1..2000); # Wesley Ivan Hurt, Oct 10 2014
  • Mathematica
    Select[Range[2000], And @@ PrimeQ[{-1, 1} + 16# ] &] (* Ray Chandler, Nov 16 2006 *)

Extensions

Extended by Ray Chandler, Nov 16 2006

A104279 Numbers n such that 2n+1 is prime and 2n-1 is not prime.

Original entry on oeis.org

1, 5, 8, 11, 14, 18, 20, 23, 26, 29, 33, 35, 39, 41, 44, 48, 50, 53, 56, 63, 65, 68, 74, 78, 81, 83, 86, 89, 95, 98, 105, 111, 113, 116, 119, 125, 128, 131, 134, 138, 140, 146, 153, 155, 158, 165, 168, 173, 176, 179, 183, 186, 189, 191, 194, 198, 200, 204, 209, 215
Offset: 1

Views

Author

Alexandre Wajnberg, Apr 17 2005

Keywords

Examples

			a(1)=1 because 3 is prime and 1 is not prime.
a(2)=5 because 11 is prime and 9 is not prime.
		

Crossrefs

Cf. A040040 and others.

Programs

  • Magma
    [n: n in [1..220]| not IsPrime(2*n-1) and IsPrime(2*n+1)] // Vincenzo Librandi, Jan 28 2011
    
  • Maple
    filter:= n -> isprime(2*n+1) and not isprime(2*n-1):
    select(filter, [$1..300]); # Robert Israel, Apr 27 2020
  • Mathematica
    Select[ Range[218], PrimeQ[2# + 1] && !PrimeQ[2# - 1] &] (* Robert G. Wilson v, Apr 18 2005 *)
  • PARI
    is(n)=isprime(2*n+1) && !isprime(2*n-1) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

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

A108944 Minimal square k^2 such that sum of the n-th twin prime pair plus k^2 is a square.

Original entry on oeis.org

1, 4, 1, 0, 4, 16, 1, 0, 196, 9, 400, 100, 1, 16, 4, 169, 4, 36, 1936, 1, 529, 1, 36, 100, 400, 16, 25, 10000, 10816, 49, 144, 17956, 25, 400, 0, 169, 961, 16, 2500, 25, 0, 676, 3844, 784, 100, 64, 169, 121, 400, 49, 3025, 9, 17689, 78400, 400, 20449, 100, 96100, 361
Offset: 1

Views

Author

Giovanni Teofilatto, Jul 21 2005

Keywords

Crossrefs

Programs

  • Maple
    P:= select(isprime,{seq(i,i=3..10^4,2)}):
    TA:= sort((convert((P intersect (P +~ 2)),list) -~ 1)/~ 2):
    f:= proc(m) local d;
      for d in sort(convert(numtheory:-divisors(m),list)) do
        if d^2 >= m then return (d - m/d)^2 fi
      od
    end proc:
    map(f, TA); # Robert Israel, Apr 09 2025

Formula

a(n) = A108945(n) - A001359(n) - A006512(n).
a(n) = (A033677(A040040(n)) - A040040(n)/A033677(A040040(n)))^2. - Robert Israel, Apr 09 2025

Extensions

Edited and extended by Ray Chandler, Jul 25 2005

A221310 Numbers m such that exactly four subsets of {m-1, m, m+1} sum up to a prime number.

Original entry on oeis.org

1, 2, 3, 6, 30, 660, 810, 2130, 2550, 3330, 3390, 5850, 6270, 10530, 33180, 41610, 44130, 53550, 55440, 57330, 63840, 65100, 70380, 70980, 72270, 74100, 74760, 78780, 80670, 81930, 87540, 93240, 102300, 115470, 124770, 133980, 136950, 156420, 161460, 168450
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 10 2013

Keywords

Comments

A117499(a(n)) = 4;
(a(n)-1,a(n)+1) are twin prime pairs for n >= 4.

Examples

			a(1) = 1: the required 4 subsets of {1-1,1,1+1} are: {2}, {0,2}, {1,2} and {0,1,2}.
		

Crossrefs

Subsequence of A040040, apart from a(1)=1.

Programs

  • Haskell
    a221310 n = a221310_list !! (n-1)
    a221310_list = map (+ 1) $ elemIndices 4 a117499_list
  • Mathematica
    Select[Range[170000],Count[Total/@Subsets[{#-1,#,#+1}],?PrimeQ]==4&] (* _Harvey P. Dale, Jul 30 2019 *)

A066542 Nonnegative integers all of whose anti-divisors are either 2 or odd.

Original entry on oeis.org

3, 4, 5, 7, 8, 11, 13, 16, 17, 19, 23, 29, 31, 32, 37, 41, 43, 47, 53, 59, 61, 64, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251
Offset: 1

Views

Author

John W. Layman, Jan 07 2002

Keywords

Comments

See A066272 for definition of anti-divisor.
The following conjectures have been proved by Bob Selcoe. - Michael Somos, Feb 28 2014
Additional conjectures suggested by computational experiments:
1) Numbers all of whose anti-divisors (AD's) are odd => {2^k} (A000079).
2) Numbers with AD 2, all other AD's odd => primes (A000040).
3) Numbers none of whose AD's are multiples of 3 => 3*2^k (A007283).
4) Numbers all of whose AD's are even => 3*A002822 = A040040 (except for a(0)=1), both related to twin prime pairs.
Calculations suggest the following conjecture. This sequence consists of all odd primes and nonnegative powers of 2 and no other terms. This has been verified for to n=100000. Robert G. Wilson v extended the conjecture out to 2^20.
From Bob Selcoe, Feb 24 2014: (Start)
The sequence consists of all odd primes and powers of two (>=2^2) and no other terms.
Proof: Denote the even anti-divisors of n as ADe(n). ADe(n) is defined as the set of numbers x satisfying the equation n(mod x)=x/2. Substitute x = 2n/y, since it can be shown that ADe(n) => 2n divided by the odd divisors of n when n>1 (This is because 2j anti-divides only numbers of the form 3j+2j*k; j>=1, k>=0. For example: j=7; 14 anti-divides only 21,35,49,63.... So in other words, even numbers anti-divide only odd multiples (>=3) of themselves, divided by 2). Therefore, ADe(n) is n(mod [2n/y])=n/y, and y must be an odd divisor of n and 2n, y>1. Since y is the only odd divisor of n when y>1 iff n is prime, then ADe(n) => 2 when n is prime. Since 2n has no odd divisors when n=2^k, then ADe(n) is null when n=2^k. Therefore, the only numbers whose anti-divisors are either 2 or odd must be primes and powers of 2.
Similarly, for odd anti-divisors (ADo(n)): Given 2j+1 (odd numbers) anti-divide only numbers of the forms [(3j+1)+(2j+1)*k] and [(3j+2)+(2j+1)*k]; j>=1, k>=0. (For example: j=6; 13 anti-divides only 19,20, 32,33, 45,46...). Since odd n divided by its odd divisors ARE its odd divisors, then ADo(n) => the divisors of 2n-1 and 2n+1 (except 1, 2n-1 and 2n+1).
By extension:
1) Numbers all of whose anti-divisors (AD's) are odd => {2^k} (A000079).
2) Numbers with ADe(n)=2, all other AD's odd => primes (A000040).
3) Numbers none of whose AD's are multiples of j => j*2^k.
4) When 2n-1 and 2n+1 are twin primes, (A040040, except for a(0)=1) then n has only even AD's.
(End)
If 1 and 2 are included, this sequence contains all positive integers not contained in A111774. - Bob Selcoe, Sep 09 2014 [corrected by Wolfdieter Lang, Nov 06 2020]

Examples

			From _Bob Selcoe_, Feb 24 2014: (Start)
ADe(420): Odd divisors of 420 are: 3,5,7,15,21,35, 105. ADe(420) => 840/{3,5,7,15,21,35,105} = 8,24,40,56,120,168 and 280.
ADo(420) => the divisors of 839 and 841, which are (a) for 839: null (839 is prime); and (b) for 841: 29 (841 is 29^2).
All AD's (AD(420)) => 8,24,29,40,56,120,168 and 280 (End)
		

Crossrefs

Programs

  • Mathematica
    antid[n_] := Select[ Union[ Join[ Select[ Divisors[2n - 1], OddQ[ # ] && # != 1 &], Select[ Divisors[2n + 1], OddQ[ # ] && # != 1 &], 2n / Select[ Divisors[2*n], OddQ[ # ] && # != 1 &]]], # < n & ]; f[n_] := Select[ antid[n], EvenQ[ # ] && # > 2 & ]; Select[ Range[3, 300], f[ # ] == {} & ]

A104280 Numbers n such that 2n+1 is not prime and 2n-1 is prime.

Original entry on oeis.org

4, 7, 10, 12, 16, 19, 22, 24, 27, 31, 34, 37, 40, 42, 45, 49, 52, 55, 57, 64, 66, 70, 76, 79, 82, 84, 87, 91, 97, 100, 106, 112, 115, 117, 121, 126, 129, 132, 136, 139, 142, 147, 154, 157, 159, 166, 169, 175, 177, 180, 184, 187, 190, 192, 195, 199, 201, 205, 211, 217
Offset: 1

Views

Author

Alexandre Wajnberg, Apr 17 2005

Keywords

Crossrefs

Cf. A040040 and others.
Equals A136798/2.

Programs

  • Magma
    [n: n in [0..250]| not IsPrime(2*n+1) and IsPrime(2*n-1)] // Vincenzo Librandi, Jan 28 2011
    
  • Mathematica
    Select[ Range[219], !PrimeQ[2# + 1] && PrimeQ[2# - 1] &] (* Robert G. Wilson v, Apr 18 2005 *)
  • PARI
    is(n)=isprime(2*n-1) && !isprime(2*n+1) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

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

A153196 Numbers n such that 6*n+5 and 6*n+7 are twin primes.

Original entry on oeis.org

0, 1, 2, 4, 6, 9, 11, 16, 17, 22, 24, 29, 31, 32, 37, 39, 44, 46, 51, 57, 69, 71, 76, 86, 94, 99, 102, 106, 109, 134, 136, 137, 142, 146, 169, 171, 174, 176, 181, 191, 204, 212, 214, 216, 219, 237, 241, 246, 247, 267, 269, 277, 282, 286, 297, 311, 312, 321, 324, 332
Offset: 1

Views

Author

Vincenzo Librandi, Dec 20 2008

Keywords

Comments

Appears to be the partial sums of A160273 which are the successive differences (divided by 3) of the average of twin prime pairs divided by 2 (A040040). - Stephen Crowley, May 24 2009

Examples

			For n = 0, 6*n+5 = 5 and 6*n+7 = 7 are twin primes;
for n = 99, 6*n+5 = 599 and 6*n+7 = 601 are twin primes.
		

Crossrefs

Cf. A001359 (lesser of twin primes), A002822 (6n-1, 6n+1 are twin primes).
Cf. A037074. - Vincenzo Librandi, Dec 26 2008

Programs

  • Magma
    [ n: n in [0..335] | IsPrime(6*n+5) and IsPrime(6*n+7) ];
  • Maple
    ZL := []; for p to 1000000 do if `and`(isprime(p), isprime(p+2)) then ZL := [op(ZL), ((p+2)^2-p^2)*(1/8)] end if end do; A160273 := [seq((ZL[i+1]-ZL[i])*(1/3), i = 2 .. nops(ZL)-1)]: ListTools[PartialSums]( A160273 ); # Stephen Crowley, May 24 2009
  • Mathematica
    Select[Range[0, 350], PrimeQ[6 # + 5]&&PrimeQ[6 # + 7]&] (* Vincenzo Librandi, Apr 04 2013 *)

Formula

a(j) = (A001359(j+1)-5)/6.
a(j) = A002822(j)-1.

Extensions

Edited and extended by Klaus Brockhaus, Dec 26 2008

A168044 Half of the even nonisolated nonprimes A167692.

Original entry on oeis.org

0, 4, 5, 7, 8, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 17 2009

Keywords

Comments

Apart from the first term, numbers n with at least one of 2n-1 and 2n+1 composite. - Charles R Greathouse IV, Mar 25 2010
It is possible to create a sieve for twin primes because these numbers are of the form i+j+2*i*j and 1+i+j+2*i*j for i,j >= 1. Except 1, complement of A040040 where 2*a(n)-1 and 2*a(n)+1 are twin primes. - Davide Rotondo, Jan 19 2021

Crossrefs

Cf. A167692.
Except 1, complement of A040040.

Programs

  • Mathematica
    Select[Range[0,100], Mod[#, 2] == 0 && !PrimeQ[#] && (! PrimeQ[# - 1] || !PrimeQ[# + 1]) & ]/2 (* G. C. Greubel, Jul 07 2016 *)

Formula

a(n) = A167692(n)/2.

A168497 The halfs of even single (or even isolated) numbers.

Original entry on oeis.org

1, 2, 3, 6, 9, 15, 21, 30, 36, 51, 54, 69, 75, 90, 96, 99, 114, 120, 135, 141, 156, 174, 210, 216, 231, 261, 285, 300, 309, 321, 330, 405, 411, 414, 429, 441, 510, 516, 525, 531, 546, 576, 615, 639, 645, 651, 660, 714, 726, 741, 744, 804, 810, 834, 849, 861, 894
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 27 2009

Keywords

Comments

Essentially the same as A040040: 1, followed by A040040. - Joerg Arndt, Jun 18 2015
Even single (or isolated) numbers/2. Unit together with (average of twin prime pairs (A014574), divided by 2).

Crossrefs

Formula

a(n)=A167777(n)/2.

Extensions

Entries checked by R. J. Mathar, Apr 14 2010
Previous Showing 21-30 of 43 results. Next