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 11 results. Next

A067432 Number of ways to represent the n-th prime in form p*q+p+q, where p and q are primes (see A066938).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 15 2002

Keywords

Comments

a(A049084(A066938(n))) > 0; a(A049084(A198273(n))) = 0; a(A049084(A198277(n))) = n and a(A049084(m)) <> n for m < A198277(n). [Reinhard Zumkeller, Oct 23 2011]
a(n) < A072670(n).

Examples

			a(15) = 2 as A000040(15) = 47 = 3*11+3+11 = 5*7+5+7.
		

Crossrefs

Programs

  • Haskell
    a067432 n = length [p | let prime_n = a000040 n,
       p <- takeWhile (< a000196 prime_n) a000040_list,
       let (q,m) = divMod (prime_n - p) (p + 1),
       m == 0, a010051 q == 1]
    a067432_list = map a067432 [1..]
    -- Reinhard Zumkeller, Oct 23 2011

A072670 Number of ways to write n as i*j + i + j, 0 < i <= j.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jun 30 2002

Keywords

Comments

a(n) is the number of partitions of n+1 with summands in arithmetic progression having common difference 2. For example a(29)=3 because there are 3 partitions of 30 that are in arithmetic progressions: 2+4+6+8+10, 8+10+12 and 14+16. - N-E. Fahssi, Feb 01 2008
From Daniel Forgues, Sep 20 2011: (Start)
a(n) is the number of nontrivial factorizations of n+1, in two factors.
a(n) is the number of ways to write n+1 as i*j + i + j + 1 = (i+1)(j+1), 0 < i <= j. (End)
a(n) is the number of ways to write n+1 as i*j, 1 < i <= j. - Arkadiusz Wesolowski, Nov 18 2012
For a generalization, see comment in A260804. - Vladimir Shevelev, Aug 04 2015
Number of partitions of n into 3 parts whose largest part is equal to the product of the other two. - Wesley Ivan Hurt, Jan 04 2022

Examples

			a(11)=2: 11 = 1*5 + 1 + 5 = 2*3 + 2 + 3.
From _Daniel Forgues_, Sep 20 2011 (Start)
Number of nontrivial factorizations of n+1 in two factors:
  0 for the unit 1 and prime numbers
  1 for a square: n^2 = n*n
  1 for 6 (2*3), 10 (2*5), 14 (2*7), 15 (3*5)
  1 for a cube: n^3 = n*n^2
  2 for 12 (2*6, 3*4), for 18 (2*9, 3*6) (End)
		

Crossrefs

Programs

  • Maple
    0, seq(ceil(numtheory:-tau(n+1)/2)-1, n=1..100); # Robert Israel, Aug 04 2015
  • Mathematica
    p2[n_] := 1/2 (Length[Divisors[n]] - 2 + ((-1)^(Length[Divisors[n]] + 1) + 1)/2); Table[p2[n + 1], {n, 0, 104}] (* N-E. Fahssi, Feb 01 2008 *)
    Table[Ceiling[DivisorSigma[0, n + 1]/2] - 1, {n, 0, 104}] (* Arkadiusz Wesolowski, Nov 18 2012 *)
  • PARI
    is_ok(k,i,j)=0=i&&k===i*j+i+j;
    first(m)=my(v=vector(m,z,0));for(l=1,m,for(j=1,l,for(i=1,j,if(is_ok(l,i,j),v[l]++))));concat([0],v); /* Anders Hellström, Aug 04 2015 */
    
  • PARI
    a(n)=(numdiv(n+1)+issquare(n+1))/2-1 \\ Charles R Greathouse IV, Jul 14 2017

Formula

a(n) = A038548(n+1) - 1.
From N-E. Fahssi, Feb 01 2008: (Start)
a(n) = p2(n+1), where p2(n) = (1/2)*(d(n) - 2 + ((-1)^(d(n)+1)+1)/2); d(n) is the number of divisors of n: A000005.
G.f.: Sum_{n>=1} a(n) x^n = 1/x Sum_{k>=2} x^(k^2)/(1-x^k). (End)
lim_{n->infinity} a(A002110(n)-1) = infinity. - Vladimir Shevelev, Aug 04 2015
a(n) = A161840(n+1)/2. - Omar E. Pol, Feb 27 2019
Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 3) / 2, where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 14 2024

A072668 Numbers one less than composite numbers.

Original entry on oeis.org

3, 5, 7, 8, 9, 11, 13, 14, 15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 80, 81, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Henry Bottomley, Apr 11 2001

Keywords

Comments

Complement of A006093 (primes minus 1).
Numbers which can be written as i*j+i+j, 0A072670(a(n))>0 for n>1.
a(n)! is divisible by a(n)*(a(n)+1)/2, see A060462.

Crossrefs

Programs

  • Magma
    [n-1: n in [2..120] | not IsPrime(n)]; // Vincenzo Librandi, Jun 09 2015
    
  • Mathematica
    Select[Range[4, 96], CompositeQ] - 1 (* Michael De Vlieger, Dec 10 2020 *)
  • PARI
    for(n=2,100,if(!isprime(n),print1(n-1,", "))) \\ Derek Orr, Jun 08 2015
    
  • Python
    from sympy import composite
    def A072668(n): return composite(n)-1 # Chai Wah Wu, Aug 02 2024

Formula

a(n) = A002808(n) - 1.
a(n) = 2*A002808(n) - A079696(n). - Juri-Stepan Gerasimov, Oct 22 2009
a(n) = A060462(n).

A072673 Primes of form prime(n)*prime(2*n)+prime(n)+prime(2*n).

Original entry on oeis.org

11, 31, 83, 359, 1487, 4283, 4751, 5471, 7127, 12527, 41183, 66863, 71339, 85247, 186119, 274223, 290987, 338687, 373859, 386219, 400679, 465299, 490643, 663407, 720791, 827147, 883739, 1096127, 1124603
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 30 2002

Keywords

Examples

			A000040(236) = 1487 = 1403+23+61 = 23*61+23+61 = A000040(9)*A000040(18)+A000040(9)+A000040(18), therefore 1487 is a term.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=Module[{p1=Prime[n],p2=Prime[2n]},p1*p2+p1+p2]; Select[ Array[ p,200],PrimeQ] (* Harvey P. Dale, Jul 14 2014 *)

A091301 Primes of the form p*q + p - q, where p and q are distinct primes.

Original entry on oeis.org

5, 7, 13, 17, 19, 29, 31, 37, 41, 43, 61, 67, 73, 89, 97, 103, 109, 113, 127, 137, 139, 149, 151, 157, 181, 193, 197, 199, 211, 229, 233, 241, 257, 271, 277, 281, 283, 307, 313, 317, 337, 349, 353, 373, 379, 389, 397, 401, 409, 421, 433, 449, 457, 461, 463, 487
Offset: 1

Views

Author

Zak Seidov, Feb 21 2004

Keywords

Crossrefs

Primes of the form p*q+p+q, where p and q are primes, are in A066938.
Cf. A091310.

Programs

  • Mathematica
    nn=100;Take[Select[Union[Flatten[{First[#]*Last[#]+First[#]-Last[#], First[#]*Last[#]- First[#]+Last[#]}&/@Subsets[Prime[Range[nn]],{2}]]], PrimeQ],nn] (* Harvey P. Dale, Jul 12 2014 *)
  • PARI
    list(lim)=my(v=List(),t);forprime(q=2,lim,forprime(p=2,(lim+q)\(q+1),if(ispseudoprime(t=p*q+p-q),listput(v,t))));vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Feb 15 2011

Extensions

Definition clarified by Harvey P. Dale, Jul 12 2014

A091305 Primes of the form p*q - p - q, where p and q are primes.

Original entry on oeis.org

3, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 47, 59, 71, 79, 83, 101, 103, 107, 131, 137, 139, 149, 163, 167, 179, 191, 197, 199, 211, 223, 227, 239, 251, 263, 269, 271, 281, 311, 331, 347, 359, 379, 383, 419, 431, 443, 461, 463, 467, 479, 491, 499, 503, 521, 523
Offset: 1

Views

Author

Zak Seidov, Feb 21 2004

Keywords

Comments

Some primes have more than one representation (besides of symmetry in p,q!), e.g. 11 with (p,q)=(2,13) and (3,7).
If (r,r+2) is a twin prime pair then r is in this sequence (with q=2, p=r+2). - Emmanuel Vantieghem, Jun 02 2025

Examples

			31 is a member with p=3, q=17.
		

Crossrefs

Cf. A066938 (p*q + p + q), A091301 (p*q + p - q).
Cf. A001359 (subsequence).

Programs

  • Maple
    N:= 1000: # for terms <= N
    P:= select(isprime, [2,seq(i,i=3..N/2,2)]):
    S:= {}:
    for i from 1 to nops(P) do
      for j from 1 to i do
        x:= P[i]*P[j]-P[i]-P[j];
        if x > N then break fi;
        if isprime(x) then S:= S union {x} fi
    od od:
    sort(convert(S,list)); # Robert Israel, Jun 05 2025
  • Mathematica
    mp[{p_,q_}]:=p*q-p-q; Take[Union[Select[mp/@Subsets[Prime[Range[100]],{2}], PrimeQ]],60] (* Harvey P. Dale, Nov 27 2011 *)
  • PARI
    isA091305(p)=fordiv(p++,d,if(isprime(d+1)&isprime(p/d+1), return(isprime(p-1)))) \\ Charles R Greathouse IV, Feb 15 2011

A198273 Primes not of the form p*q + p + q for any primes p and q.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 29, 37, 43, 61, 67, 73, 97, 101, 103, 109, 137, 139, 149, 157, 163, 173, 181, 193, 197, 199, 211, 223, 229, 233, 241, 257, 277, 281, 283, 307, 313, 317, 331, 337, 347, 349, 353, 367, 373, 379, 389, 397, 401, 409, 421, 433, 457, 461, 463
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 23 2011

Keywords

Comments

A067432(A049084(a(n))) = 0; complement of A066938 with respect to A000040.

Crossrefs

Programs

  • Haskell
    a198273 n = a198273_list !! (n-1)
    a198273_list = map a000040 $ filter ((== 0) . a067432) [1..]
    
  • Mathematica
    nn = 500; n2 = PrimePi[nn/3]; Complement[Prime[Range[PrimePi[nn]]], Select[Union[Flatten[Table[(Prime[i] + 1) (Prime[j] + 1) - 1, {i, n2}, {j, n2}]]], # <= nn && PrimeQ[#] &]] (* T. D. Noe, Nov 22 2011 *)
    Reap[For[P=2, P<500, P = NextPrime[P], If[Reduce[P == p*q + p + q, {p, q}, Primes] === False, Print[P]; Sow[P]]]][[2, 1]] (* Jean-François Alcover, Dec 10 2015 *)
  • PARI
    do(lim)=my(v=Set(),t);;forprime(p=3,lim,forprime(q=2,p-1,t=p*q+p+q;if(t>lim,break);v=setunion(v,[t])));setminus(primes(primepi(lim)),v) \\ Charles R Greathouse IV, Nov 22 2011

A363638 Primes p such that p+1 can be written as a product of smaller numbers that are also of the form prime+1.

Original entry on oeis.org

11, 17, 23, 31, 41, 47, 53, 59, 71, 79, 83, 89, 107, 113, 127, 131, 151, 167, 179, 191, 223, 227, 239, 251, 263, 269, 271, 293, 311, 359, 383, 419, 431, 439, 443, 449, 479, 491, 503, 521, 557, 587, 593, 599, 607, 631, 647, 659, 683, 701, 719, 727, 743, 773
Offset: 1

Views

Author

Pontus von Brömssen, Jun 19 2023

Keywords

Examples

			11 is a term because 11 is prime, 11+1 = 3*4 = (2+1)*(3+1), and 2 and 3 are prime.
223 is a term because 223 is prime, 223+1 = 4*4*14 = (3+1)^2*(13+1), and 3 and 13 are prime. (This is the first term that requires more than two factors, i.e., it is not a term of A066938.)
		

Crossrefs

Cf. A008864, A066938 (subsequence), A363636, A363750.

A256074 Squares representable as k*m + k + m, where k >= m > 1 are squares.

Original entry on oeis.org

49, 169, 324, 441, 961, 1849, 2209, 3249, 5329, 8281, 12321, 15129, 17424, 17689, 24649, 33489, 44521, 58081, 58564, 64009, 65025, 74529, 94249, 103684, 117649, 145161, 177241, 191844, 214369, 237169, 257049, 305809, 361201, 423801, 480249, 494209, 573049, 660969, 700569
Offset: 1

Views

Author

Alex Ratushnyak, Mar 14 2015

Keywords

Comments

A subsequence of A254671.
The sequence of square roots of a(n) begins: 7, 13, 18, 21, 31, 43, 47, 57, 73, 91, 111, 123, 132, 133, 157, 183, 211, 241, 242, 253, 255, 273, 307, 322, 343.
This sequence is infinite via x = m^2 and y = (m + 1)^2 so then x*y + x + y = m^2 * (m + 1)^2 + m^2 + (m + 1)^2 = m^4 + 2*m^3 + 3*m^2 + 2*m + 1 = (m^2 + m + 1)^2. - David A. Corneth, Oct 19 2024

Examples

			a(1) = 49 = 4*9 + 4 + 9.
a(2) = 169 = 9*16 + 9 + 16.
		

Crossrefs

Programs

  • PARI
    v=[];for(m=2,100,for(k=m,10^3,if(issquare(s=(k*m)^2+k^2+m^2),v=concat(v,s))));vecsort(v) \\ Derek Orr, Mar 21 2015

Extensions

More terms from David A. Corneth, Oct 19 2024

A249444 Primes representable as p^q + p + q, where p and q are primes.

Original entry on oeis.org

13, 137, 251, 353, 2213, 4933, 24421, 78137, 148933, 205441, 371311, 493121, 524309, 571873, 912773, 1225153, 1594339, 4330913, 7189253, 13652161, 18191713, 21254213, 28629187, 31855333, 42508901, 49431233, 73560481, 81183173, 99253313, 178454113, 184220581, 192100613
Offset: 1

Views

Author

Alex Ratushnyak, Jan 12 2015

Keywords

Crossrefs

Showing 1-10 of 11 results. Next