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

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

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

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, 227, 239, 251, 263, 269, 271, 293, 311, 359, 383, 419, 431, 439, 443, 449, 479, 491, 503, 521, 587, 593, 599, 607, 631, 647, 659, 683, 701, 719, 727, 743, 773, 809, 827
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 24 2002

Keywords

Comments

For p not equal to q, either p*q or p+q is odd, so their sum is odd.
The representation is ambiguous, e.g. 2*7+2+7 = 23 = 3*5+3+5.
Complement of A198273 with respect to A000040. - Reinhard Zumkeller, Oct 23 2011
None of these primes are in A158913 since if p*q+p+q is a prime, then sigma(p*q+p+q) = sigma(p*q). - Amiram Eldar, Nov 15 2021

Examples

			59 is in the sequence because 59 = 2 * 19 + 2 + 19.
		

Crossrefs

Programs

  • Haskell
    a066938 n = a066938_list !! (n-1)
    a066938_list = map a000040 $ filter ((> 0) . a067432) [1..]
    -- Reinhard Zumkeller, Oct 23 2011
    
  • Mathematica
    nn = 1000; n2 = PrimePi[nn/3]; Select[Union[Flatten[Table[(Prime[i] + 1) (Prime[j] + 1) - 1, {i, n2}, {j, n2}]]], # <= nn && PrimeQ[#] &]
  • PARI
    is(n)=fordiv(n+1,d,my(p=d-1,q=(n+1)/d-1); if(isprime(p) && isprime(q), return(isprime(n)))); 0 \\ Charles R Greathouse IV, Jul 23 2013

Formula

A067432(A049084(a(n))) > 0. - Reinhard Zumkeller, Oct 23 2011
A054973(a(n)+1) >= 2. - Amiram Eldar, Nov 15 2021

Extensions

Edited by Robert G. Wilson v, Feb 01 2002

A198277 a(n) is the smallest prime such that exactly n prime pairs (p,q) exist with a(n) = p * q + p + q.

Original entry on oeis.org

2, 11, 23, 71, 239, 719, 2879, 5039, 1439, 10079, 37799, 126719, 55439, 110879, 181439, 191519, 166319, 635039, 514079, 665279, 1330559, 907199, 3243239, 831599, 2948399, 6320159, 4989599, 15301439, 14137199, 5266799, 11531519, 8315999, 23284799, 17463599, 45208799, 52390799, 34594559, 111767039, 95633999, 117976319, 70685999, 68468399
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 23 2011

Keywords

Comments

A067432(A049084(a(n))) = n and A067432(A049084(m)) <> n for m < a(n).

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a198277 n = a000040 . (+ 1) . fromJust $ elemIndex n a067432_list
    
  • PARI
    ct(n)=sumdiv(n+1,d,if(d^2>n,0, isprime(d-1)&&isprime(n\d)))
    v=vector(60);forprime(p=2,1e9, t=ct(p);if(t && !v[t], v[t]=p; print(t" "p))); v \\ with 0's for unknown; Charles R Greathouse IV, Jul 24 2013

Extensions

a(27)-a(33) from Donovan Johnson, Oct 24 2011
a(34)-a(41) from Charles R Greathouse IV, Jul 24 2013

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
Showing 1-4 of 4 results.