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-7 of 7 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

A169695 a(n) = 1 if n is a square, otherwise a(n) = 2.

Original entry on oeis.org

1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2
Offset: 0

Views

Author

N. J. A. Sloane, Apr 15 2010

Keywords

Comments

Also number of central divisors of n, if n >= 1. - Omar E. Pol, Feb 10 2011.
Length of n-th row in the array of A207375, if n >= 1. - Omar E. Pol, Feb 27 2012

Crossrefs

Programs

  • Mathematica
    Array[2 - Boole[IntegerQ@ Sqrt@ #] &, 105, 0] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    a(n) = 2 - issquare(n); \\ Amiram Eldar, Apr 17 2024

Formula

From Omar E. Pol, Feb 10 2011: (Start)
a(n) = 2 - A010052(n).
a(n) = 1 + A049240(n), n >=1.
a(n) = A000005(n)-A161840(n), n >= 1. (End)

A200213 Ordered factorizations of n with 2 distinct parts, both > 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 4, 0, 2, 2, 2, 0, 4, 0, 4, 2, 2, 0, 6, 0, 2, 2, 4, 0, 6, 0, 4, 2, 2, 2, 6, 0, 2, 2, 6, 0, 6, 0, 4, 4, 2, 0, 8, 0, 4, 2, 4, 0, 6, 2, 6, 2, 2, 0, 10, 0, 2, 4, 4, 2, 6, 0, 4, 2, 6, 0, 10, 0, 2, 4, 4, 2, 6, 0, 8, 2, 2, 0, 10, 2
Offset: 1

Views

Author

Peter Luschny, Nov 14 2011

Keywords

Examples

			a(24) = 6 = card({{2,12},{3,8},{4,6},{6,4},{8,3},{12,2}}).
		

Crossrefs

Programs

  • Maple
    a := n -> `if`(n<2, 0, numtheory:-tau(n) - `if`(issqr(n), 3, 2)):
    seq(a(n), n = 1..85); # Peter Luschny, Jul 10 2017
  • Mathematica
    OrderedFactorizations[1] = {{}}; OrderedFactorizations[n_?PrimeQ] := {{n}}; OrderedFactorizations[n_] := OrderedFactorizations[n] = Flatten[Function[d, Prepend[#, d] & /@ OrderedFactorizations[n/d]] /@ Rest[Divisors[n]], 1]; a[n_] := With[{of2 = Sort /@ Select[OrderedFactorizations[n], Length[#] == 2 && Length[# // Union] == 2 &] // Union}, Length[Permutations /@ of2 // Flatten[#, 1] &]];  Table[a[n], {n, 1, 85}] (* Jean-François Alcover, Jul 02 2013, copied and adapted from The Mathematica Journal *)
  • PARI
    A200213(n) = if(!n,n,sumdiv(n, d, (d<>(n/d))*(d>1)*(dAntti Karttunen, Jul 07 2017
    
  • PARI
    a(n) = if (n==1, 0, numdiv(n) - issquare(n) - 2); \\ Michel Marcus, Jul 07 2017
    
  • Scheme
    (define (A200213 n) (if (<= n 1) 0 (- (A000005 n) 2 (A010052 n)))) ;; Antti Karttunen, Jul 07 2017

Formula

From Antti Karttunen, Jul 07 & Jul 09 2017: (Start)
a(1) = 0; for n > 1, a(n) = A000005(n) - A010052(n) - 2.
For n >= 2, a(n) = A161840(n) - 2*A010052(n). (End)

Extensions

Description clarified and term a(0) removed by Antti Karttunen, Jul 09 2017

A207376 Sum of central divisors of n.

Original entry on oeis.org

1, 3, 4, 2, 6, 5, 8, 6, 3, 7, 12, 7, 14, 9, 8, 4, 18, 9, 20, 9, 10, 13, 24, 10, 5, 15, 12, 11, 30, 11, 32, 12, 14, 19, 12, 6, 38, 21, 16, 13, 42, 13, 44, 15, 14, 25, 48, 14, 7, 15, 20, 17, 54, 15, 16, 15, 22, 31, 60, 16, 62, 33, 16, 8, 18, 17, 68, 21, 26, 17
Offset: 1

Views

Author

Omar E. Pol, Feb 23 2012

Keywords

Comments

If n is a square (A000290) then a(n) = sqrt(n) because the squares have only one central divisor. If n is a prime p then a(n) = 1 + p = A000203(n). For the number of central divisors of n see A169695.

Examples

			For n = 12 the divisors of 12 are 1, 2, 3, 4, 6, 12. The central (or middle) divisors of 12 are 3 and 4, so a(12) = 3 + 4 = 7.
		

Crossrefs

Row sums of A207375. Where records occur give A008578.

Programs

  • Mathematica
    cdn[n_]:=Module[{dn=Divisors[n],len},len=Length[dn]; Which[ IntegerQ[ Sqrt[n]], Sqrt[n], PrimeQ[n],n+1, OddQ[len],dn[[Floor[len/2]+1]], EvenQ[len],dn[[len/2]]+dn[[len/2+1]]]]; Array[cdn,70] (* Harvey P. Dale, Nov 07 2012 *)

Formula

a(n) = A000203(n) - A323643(n). - Omar E. Pol, Feb 26 2019

A323643 a(n) is the sum of the noncentral divisors of n.

Original entry on oeis.org

0, 0, 0, 5, 0, 7, 0, 9, 10, 11, 0, 21, 0, 15, 16, 27, 0, 30, 0, 33, 22, 23, 0, 50, 26, 27, 28, 45, 0, 61, 0, 51, 34, 35, 36, 85, 0, 39, 40, 77, 0, 83, 0, 69, 64, 47, 0, 110, 50, 78, 52, 81, 0, 105, 56, 105, 58, 59, 0, 152, 0, 63, 88, 119, 66, 127, 0, 105, 70, 127
Offset: 1

Views

Author

Omar E. Pol, Feb 25 2019

Keywords

Comments

a(n) = 0 iff n is 1 or a prime (A008578).

Examples

			For n = 12 the divisors of 12 are 1, 2, 3, 4, 6, 12. The central divisors of 12 are both 3 and 4, therefore the noncentral divisors are 1, 2, 6, 12, and the sum of them is 1 + 2 + 6 + 12 = 21, so a(12) = 21.
For n = 16 the divisors of 16 are 1, 2, 4, 8, 16. The central divisor of 16 is 4, therefore the noncentral divisors of 16 are 1, 2, 8, 16, and the sum of them is 1 + 2 + 8 + 16 = 27, so a(16) = 27.
		

Crossrefs

Programs

  • Mathematica
    sncd[n_]:=Module[{d=Divisors[n],len},len=Length[d];If[EvenQ[len],Total[ Drop[ d, {len/2,len/2+1}]],Total[Drop[d,{(len+1)/2}]]]]; Array[sncd,70] (* Harvey P. Dale, Apr 13 2019 *)

Formula

a(n) = A000203(n) - A207376(n).

A323644 Numbers with 3 or 4 divisors.

Original entry on oeis.org

4, 6, 8, 9, 10, 14, 15, 21, 22, 25, 26, 27, 33, 34, 35, 38, 39, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 125, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 169, 177, 178, 183, 185, 187, 194, 201, 202, 203, 205
Offset: 1

Views

Author

Omar E. Pol, Feb 26 2019

Keywords

Comments

Also numbers k such that the noncentral divisors of k are 1 and k.
Also numbers which are either semiprimes (A001358) or the cube of a prime (A030078). In other words: numbers which are either the product of two distinct primes (A006881) or the square of a prime (A001248) or the cube of a prime (A030078).

Examples

			4 is in the sequence because 4 has three divisors, they are 1, 2, 4. On the other hand, the noncentral divisors of 4 are 1 and 4, in accordance with the first comment.
6 is in the sequence because 6 has four divisors, they are 1, 2, 3, 6. On the other hand, the noncentral divisors of 6 are 1 and 6, in accordance with the first comment.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200], MemberQ[{3, 4}, DivisorSigma[0, #]] &] (* Amiram Eldar, Dec 03 2020 *)
  • PARI
    isok(n) = my(nd=numdiv(n)); (nd==3) || (nd==4); \\ Michel Marcus, Feb 26 2019

A183002 a(n) is the total number of noncentral divisors in all positive integers <= n.

Original entry on oeis.org

0, 0, 0, 2, 2, 4, 4, 6, 8, 10, 10, 14, 14, 16, 18, 22, 22, 26, 26, 30, 32, 34, 34, 40, 42, 44, 46, 50, 50, 56, 56, 60, 62, 64, 66, 74, 74, 76, 78, 84, 84, 90, 90, 94, 98, 100, 100, 108, 110, 114, 116, 120, 120, 126, 128, 134, 136, 138, 138, 148, 148, 150, 154
Offset: 1

Views

Author

Omar E. Pol, Jan 27 2011

Keywords

Comments

The original name was: Partial sums of A161840.

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= n-> (x-> x-2+(x mod 2))(tau(n)):
    a:= proc(n) option remember; b(n) +`if`(n=1, 0, a(n-1)) end:
    seq(a(n), n=1..100);
  • Mathematica
    Accumulate[Table[d = DivisorSigma[0, n]; If[OddQ[d], d - 1, d - 2], {n, 100}]]
  • PARI
    lista(nmax) = {my(s = 0, d); for(n = 1, nmax, d = numdiv(n); s += (d + d%2 - 2); print1(s, ", ")); } \\ Amiram Eldar, Jan 19 2024

Formula

a(n) = Sum_{k=1..n} (tau(k)-2 + (tau(k) mod 2)), tau = A000005.
a(n) ~ n * (log(n) + 2*gamma - 3), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 19 2024

Extensions

New name from Omar E. Pol, Jan 04 2022
Showing 1-7 of 7 results.