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.

Showing 1-10 of 13 results. Next

A098090 Numbers k such that 2k-3 is prime.

Original entry on oeis.org

3, 4, 5, 7, 8, 10, 11, 13, 16, 17, 20, 22, 23, 25, 28, 31, 32, 35, 37, 38, 41, 43, 46, 50, 52, 53, 55, 56, 58, 65, 67, 70, 71, 76, 77, 80, 83, 85, 88, 91, 92, 97, 98, 100, 101, 107, 113, 115, 116, 118, 121, 122, 127, 130, 133, 136, 137, 140, 142, 143, 148, 155, 157, 158
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Sep 14 2004

Keywords

Comments

Supersequence of A063908.
Left edge of the triangle in A065305. - Reinhard Zumkeller, Jan 30 2012

Crossrefs

Numbers n such that 2n+k is prime: A005097 (k=1), A067076 (k=3), A089038 (k=5), A105760 (k=7), A155722 (k=9), A101448 (k=11), A153081 (k=13), A089559 (k=15), A173059 (k=17), A153143 (k=19).
Numbers n such that 2n-k is prime: A006254 (k=1), this sequence (k=3), A089253 (k=5), A089192 (k=7), A097069 (k=9), A097338 (k=11), A097363 (k=13), A097480 (k=15), A098605 (k=17), A097932 (k=19).

Programs

Formula

Half of p + 3, where p is a prime greater than 2.
A122845(a(n), 3) = 3; a(n) = A113935(n+1)/2. - Reinhard Zumkeller, Sep 14 2006

A216624 Square array read by antidiagonals, T(n,k) = sum_{c|n,d|k} gcd(c,d) for n>=1, k>=1.

Original entry on oeis.org

1, 2, 2, 2, 5, 2, 3, 4, 4, 3, 2, 8, 6, 8, 2, 4, 4, 6, 6, 4, 4, 2, 10, 4, 15, 4, 10, 2, 4, 4, 12, 6, 6, 12, 4, 4, 3, 11, 4, 16, 8, 16, 4, 11, 3, 4, 6, 8, 6, 8, 8, 6, 8, 6, 4, 2, 10, 10, 22, 4, 30, 4, 22, 10, 10, 2, 6, 4, 8, 9, 8, 8, 8, 8, 9, 8, 4, 6
Offset: 1

Views

Author

Peter Luschny, Sep 12 2012

Keywords

Comments

T(n,k) = number of subgroups of C_n X C_k. [Hampjes et al.] - N. J. A. Sloane, Feb 02 2013

Examples

			[----1---2---3---4---5---6---7---8---9--10--11--12]
[ 1] 1,  2,  2,  3,  2,  4,  2,  4,  3,  4,  2,  6
[ 2] 2,  5,  4,  8,  4, 10,  4, 11,  6, 10,  4, 16
[ 3] 2,  4,  6,  6,  4, 12,  4,  8, 10,  8,  4, 18
[ 4] 3,  8,  6, 15,  6, 16,  6, 22,  9, 16,  6, 30
[ 5] 2,  4,  4,  6,  8,  8,  4,  8,  6, 16,  4, 12
[ 6] 4, 10, 12, 16,  8, 30,  8, 22, 20, 20,  8, 48
[ 7] 2,  4,  4,  6,  4,  8, 10,  8,  6,  8,  4, 12
[ 8] 4, 11,  8, 22,  8, 22,  8, 37, 12, 22,  8, 44
[ 9] 3,  6, 10,  9,  6, 20,  6, 12, 23, 12,  6, 30
[10] 4, 10,  8, 16, 16, 20,  8, 22, 12, 40,  8, 32
[11] 2,  4,  4,  6,  4,  8,  4,  8,  6,  8, 14, 12
[12] 6, 16, 18, 30, 12, 48, 12, 44, 30, 32, 12, 90
.
Displayed as a triangular array:
1,
2,  2,
2,  5,  2,
3,  4,  4,  3,
2,  8,  6,  8, 2,
4,  4,  6,  6, 4,  4,
2, 10,  4, 15, 4, 10, 2,
4,  4, 12,  6, 6, 12, 4,  4,
3, 11,  4, 16, 8, 16, 4, 11, 3,
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:= (n, k)-> add(add(igcd(c,d), c=divisors(n)), d=divisors(k)):
    seq(seq(T(n, 1+d-n), n=1..d), d=1..14); # Alois P. Heinz, Sep 12 2012
    T:=proc(m,n) local d; add( d*tau(m*n/d^2), d in divisors(gcd(m,n))); end; # N. J. A. Sloane, Feb 02 2013
  • Mathematica
    t[n_, k_] := Sum[Sum[GCD[c, d], {c, Divisors[n]}], {d, Divisors[k]}]; Table[t[n-k+1, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, May 21 2013 *)
  • Sage
    def A216624(n, k) :
        cp = cartesian_product([divisors(n), divisors(k)])
        return reduce(lambda x,y: x+y, map(gcd, cp))
    for n in (1..12): [A216624(n,k) for k in (1..12)]

Formula

T(n,n) = A060724(n) = sum_{d|n} d*tau((n/d)^2).
T(n,1) = T(1,n) = A000005(n) = tau(n).
T(n,2) = T(2,n) = A060710(n) = sum_{d|n} (3-[d is odd]) (Iverson bracket).
T(n+1,n) = A092517(n) = tau(n+1)*tau(n).
T(prime(n),1) = A007395(n) = 2.
T(prime(n),prime(n)) = A113935(n) = prime(n)+3.

A175222 a(n) = prime(n) + 5.

Original entry on oeis.org

7, 8, 10, 12, 16, 18, 22, 24, 28, 34, 36, 42, 46, 48, 52, 58, 64, 66, 72, 76, 78, 84, 88, 94, 102, 106, 108, 112, 114, 118, 132, 136, 142, 144, 154, 156, 162, 168, 172, 178, 184, 186, 196, 198, 202, 204, 216, 228, 232, 234, 238, 244, 246, 256, 262, 268, 274, 276
Offset: 1

Views

Author

Jaroslav Krizek, Mar 06 2010

Keywords

Comments

a(n) = A000040(n) + 5 = A008864(n) + 4 = A052147(n) + 3 = A113395(n) + 2 = A175221 (n) + 1 = A139049(n) - 1 = A175223(n) - 2 = A175224(n) - 3 = A140353(n) - 4 = A175225(n) - 5.

Crossrefs

Programs

Extensions

More terms from Vincenzo Librandi, Mar 14 2010

A116366 Triangle read by rows: even numbers as sums of two odd primes.

Original entry on oeis.org

6, 8, 10, 10, 12, 14, 14, 16, 18, 22, 16, 18, 20, 24, 26, 20, 22, 24, 28, 30, 34, 22, 24, 26, 30, 32, 36, 38, 26, 28, 30, 34, 36, 40, 42, 46, 32, 34, 36, 40, 42, 46, 48, 52, 58, 34, 36, 38, 42, 44, 48, 50, 54, 60, 62, 40, 42, 44, 48, 50, 54, 56, 60, 66, 68, 74, 44, 46, 48, 52, 54, 58, 60, 64, 70, 72, 78, 82
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 06 2006

Keywords

Comments

T(n,k) = 2*A065305(n,k) = A065342(n+1,k+1);
Row sums give A116367; central terms give A116368;
T(n,1) = A113935(n+1);
T(n,n-2) = A048448(n) for n>2;
T(n,n-1) = A001043(n) for n>1;
T(n,n) = A001747(n+2) = A100484(n+1).

Examples

			Triangle begins:
  6;
  8,  10;
  10, 12, 14;
  14, 16, 18, 22;
  16, 18, 20, 24, 26;
  20, 22, 24, 28, 30, 34;
  22, 24, 26, 30, 32, 36, 38;
  26, 28, 30, 34, 36, 40, 42, 46;
  32, 34, 36, 40, 42, 46, 48, 52, 58;
  34, 36, 38, 42, 44, 48, 50, 54, 60, 62;
  40, 42, 44, 48, 50, 54, 56, 60, 66, 68, 74;
  44, 46, 48, 52, 54, 58, 60, 64, 70, 72, 78, 82; etc. - _Bruno Berselli_, Aug 16 2013
		

Crossrefs

Programs

  • Magma
    [NthPrime(n+1)+NthPrime(k+1): k in [1..n], n in [1..15]]; // Bruno Berselli, Aug 16 2013
    
  • Mathematica
    Table[Prime[n+1] + Prime[k+1], {n,1,12}, {k,1,n}]//Flatten (* G. C. Greubel, May 12 2019 *)
  • PARI
    {T(n,k) = prime(n+1) + prime(k+1)}; \\ G. C. Greubel, May 12 2019
    
  • Sage
    [[nth_prime(n+1) + nth_prime(k+1) for k in (1..n)] for n in (1..12)] # G. C. Greubel, May 12 2019

Formula

T(n,k) = prime(n+1) + prime(k+1), 1 <= k <= n.

A298252 Even integers n such that n-3 is prime.

Original entry on oeis.org

6, 8, 10, 14, 16, 20, 22, 26, 32, 34, 40, 44, 46, 50, 56, 62, 64, 70, 74, 76, 82, 86, 92, 100, 104, 106, 110, 112, 116, 130, 134, 140, 142, 152, 154, 160, 166, 170, 176, 182, 184, 194, 196, 200, 202, 214, 226, 230, 232, 236, 242, 244, 254, 260, 266, 272, 274, 280
Offset: 1

Views

Author

David James Sycamore, Jan 15 2018

Keywords

Comments

Subsequence of A005843, same as A113935 with first term (5) excluded, since it is odd, not even. Index in A056240 of terms in A288313 (except for first two terms 2,4 of latter).
The terms in this sequence, combined with those in A297925 and A298366 form a partition of A005843(n); n>=3 (nonnegative numbers>=6). This is because any even integer n>=6 satisfies either(i) n-3 is prime, (ii) n-5 prime but n-3 composite, or (iii) n-5 and n-3 both composite.
a(n) is the smallest even number e > prime(n+1) such that e has a Goldbach partition containing prime(n+1). - Felix Fröhlich, Aug 18 2019

Examples

			a(1)=6 because 6-3=3; prime, and no smaller even number has this property; also a(1)=A113935(2)=6.  a(2)=8 because 8-3=5 is prime; also A113935(3)=8.
12 is not in the sequence because 12-3 = 9, composite.
		

Crossrefs

Programs

  • GAP
    Filtered([1..300],n->IsEvenInt(n) and IsPrime(n-3)); # Muniru A Asiru, Mar 23 2018
    
  • Magma
    [NthPrime(n+1) +3: n in [1..70]]; // G. C. Greubel, May 21 2019
    
  • Maple
    N:=200
      for n from 6 to N by 2 do
    if isprime(n-3) then print(n);
    end if
    end do
  • Mathematica
    Select[2 Range@125, PrimeQ[# - 3] &] (* Robert G. Wilson v, Jan 15 2018 *)
    Select[Prime[Range[100]]+3,EvenQ] (* Harvey P. Dale, Mar 07 2022 *)
  • PARI
    a(n) = prime(n + 1) + 3 \\ David A. Corneth, Mar 23 2018
    
  • Sage
    [nth_prime(n+1) +3 for n in (1..70)] # G. C. Greubel, May 21 2019

Formula

a(n) = A113935(n+1), n>=1.
A056240(a(n)) = A288313(n+2).
a(n) = prime(n + 1) + 3 = A113935(n + 1). - David A. Corneth, Mar 23 2018

A023576 Greatest prime divisor of prime(n)+3.

Original entry on oeis.org

5, 3, 2, 5, 7, 2, 5, 11, 13, 2, 17, 5, 11, 23, 5, 7, 31, 2, 7, 37, 19, 41, 43, 23, 5, 13, 53, 11, 7, 29, 13, 67, 7, 71, 19, 11, 5, 83, 17, 11, 13, 23, 97, 7, 5, 101, 107, 113, 23, 29, 59, 11, 61, 127, 13, 19, 17, 137, 7, 71, 13, 37, 31, 157, 79, 5, 167, 17, 7, 11, 89
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    FactorInteger[#][[-1, 1]] & /@ (Prime[Range[100]] + 3) (* Harvey P. Dale, Sep 05 2014 *)
  • Python
    from sympy import primefactors, prime
    def a(n): return primefactors(prime(n) + 3)[-1]
    print([a(n) for n in range(1, 72)]) # Michael S. Branicky, May 03 2021

Formula

a(n) = A006530(A113935(n)). - Michel Marcus, May 04 2021

A114557 a(2n-1) = 2*(p-1) and a(2n) = p + 3, where p=prime(n).

Original entry on oeis.org

2, 5, 4, 6, 8, 8, 12, 10, 20, 14, 24, 16, 32, 20, 36, 22, 44, 26, 56, 32, 60, 34, 72, 40, 80, 44, 84, 46, 92, 50, 104, 56, 116, 62, 120, 64, 132, 70, 140, 74, 144, 76, 156, 82, 164, 86, 176, 92, 192, 100, 200, 104, 204, 106, 212, 110, 216, 112, 224, 116, 252, 130, 260, 134
Offset: 1

Views

Author

Roger L. Bagula, Feb 15 2006

Keywords

Programs

  • Magma
    [((3-(-1)^n)*NthPrime(Floor((n+1)/2)) + (1+5*(-1)^n))/2: n in [1..70]]; // G. C. Greubel, May 20 2019
    
  • Mathematica
    Flatten[Table[Abs[Coefficient[Expand[(x+2)(x -(1 +Sqrt[Prime[n]]))*(x - (1 - Sqrt[Prime[n]]))], x, m]], {n, 1, 50}, {m, 0, 1}]]
    With[{p = Prime[Floor[(n+1)/2]]}, Table[If[OddQ[n], 2*(p-1), p+3], {n, 1, 70}]] (* G. C. Greubel, May 20 2019 *)
  • PARI
    {a(n) = ((3-(-1)^n)*prime(floor((n+1)/2)) + (1+5*(-1)^n))/2}; \\ G. C. Greubel, May 20 2019
    
  • Sage
    [( (3-(-1)^n)*nth_prime(floor((n+1)/2))+ (1+5*(-1)^n))/2 for n in (1..70)] # G. C. Greubel, May 20 2019

Formula

a(2n-1) = A037168(n). a(2n) = A113935(n).
a(n) = ( (3 - (-1)^n)*prime(floor((n+1)/2)) + (1 + 5*(-1)^n) )/2. - G. C. Greubel, May 20 2019

A173064 a(n) = prime(n) - 5.

Original entry on oeis.org

0, 2, 6, 8, 12, 14, 18, 24, 26, 32, 36, 38, 42, 48, 54, 56, 62, 66, 68, 74, 78, 84, 92, 96, 98, 102, 104, 108, 122, 126, 132, 134, 144, 146, 152, 158, 162, 168, 174, 176, 186, 188, 192, 194, 206, 218, 222, 224, 228, 234, 236, 246, 252, 258, 264, 266, 272, 276, 278, 288, 302, 306, 308, 312, 326, 332, 342, 344, 348, 354, 362, 368, 374, 378, 384, 392, 396, 404
Offset: 3

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(n) - 5: n in [3..100]]; // G. C. Greubel, May 19 2019
    
  • Mathematica
    Prime[Range[3,120]] - 5
  • PARI
    {a(n) = prime(n) - 5}; \\ G. C. Greubel, May 19 2019
    
  • Sage
    [nth_prime(n) - 5 for n in (3..100)] # G. C. Greubel, May 19 2019

A023578 Least odd prime divisor of prime(n)+3, or 1 if prime(n)+3 is a power of 2.

Original entry on oeis.org

5, 3, 1, 5, 7, 1, 5, 11, 13, 1, 17, 5, 11, 23, 5, 7, 31, 1, 5, 37, 19, 41, 43, 23, 5, 13, 53, 5, 7, 29, 5, 67, 5, 71, 19, 7, 5, 83, 5, 11, 7, 23, 97, 7, 5, 101, 107, 113, 5, 29, 59, 11, 61, 127, 5, 7, 17, 137, 5, 71, 11, 37, 5, 157, 79, 5, 167, 5, 5, 11, 89, 181, 5, 47, 191
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    a(n) = my(p = prime(n)+3, v = p/(2^valuation(p, 2))) ; if (v == 1, 1, factor(v)[1, 1]); \\ Michel Marcus, Aug 05 2021
    
  • Python
    from sympy import factorint, prime
    def A023578(n): return min((p for p in factorint(prime(n)+3) if p > 2), default=1) # Chai Wah Wu, Feb 03 2022

Formula

a(n) = A078701(A113935(n)). - Michel Marcus, Aug 05 2021

A023579 Exponent of 2 in prime factorization of prime(n)+3.

Original entry on oeis.org

0, 1, 3, 1, 1, 4, 2, 1, 1, 5, 1, 3, 2, 1, 1, 3, 1, 6, 1, 1, 2, 1, 1, 2, 2, 3, 1, 1, 4, 2, 1, 1, 2, 1, 3, 1, 5, 1, 1, 4, 1, 3, 1, 2, 3, 1, 1, 1, 1, 3, 2, 1, 2, 1, 2, 1, 4, 1, 3, 2, 1, 3, 1, 1, 2, 6, 1, 2, 1, 5, 2, 1, 1, 3, 1, 1, 3, 4, 2, 2, 1, 3, 1, 2, 1, 1, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 9, 2, 1
Offset: 1

Views

Author

Keywords

Examples

			For n=1, prime(1)+3=5, and 5 is odd, so a(1)=0.
		

Programs

  • Magma
    [Valuation(3+NthPrime(n), 2): n in [1..100]]; // G. C. Greubel, May 21 2019
    
  • Mathematica
    Table[IntegerExponent[3 + Prime[n], 2], {n, 100}] (* G. C. Greubel, May 21 2019 *)
  • PARI
    a(n) = valuation(prime(n)+3, 2); \\ Michel Marcus, Sep 30 2013
    
  • Python
    from sympy import prime
    def A023579(n): return (~(m:=prime(n)+3)& m-1).bit_length() # Chai Wah Wu, Jul 07 2022
  • Sage
    [(nth_prime(n)+3).valuation(2) for n in (1..100)] # G. C. Greubel, May 21 2019
    

Formula

a(n) = A007814(A113935(n)). - Michel Marcus, Sep 30 2013

Extensions

a(1) corrected by Michel Marcus, Sep 30 2013
Name corrected by Charles R Greathouse IV, Mar 31 2014
Showing 1-10 of 13 results. Next