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

A130695 Number of ways to write n as (a+1)(b+1)(c+1) - abc with a, b, c nonnegative integers.

Original entry on oeis.org

1, 3, 3, 6, 3, 9, 4, 9, 6, 12, 3, 15, 6, 12, 9, 15, 3, 21, 7, 15, 9, 18, 6, 24, 9, 15, 9, 24, 6, 30, 6, 15, 15, 24, 9, 30, 7, 21, 12, 30, 3, 33, 15, 21, 15, 24, 6, 39, 12, 27, 12, 27, 9, 42, 12, 21, 15, 36, 6, 45, 13, 18, 21, 36, 12, 39, 6, 33, 15, 45, 9, 42, 12, 24, 24, 30, 9, 57, 18, 30
Offset: 1

Views

Author

Jan Kristian Haugland, Jul 10 2007

Keywords

Examples

			a(7) = 4 because 7 = 7*1*1-6*0*0 = 1*7*1-0*6*0 = 1*1*7-0*0*6 = 2*2*2-1*1*1.
G.f. = x + 3*x^2 + 3*x^3 + 6*x^4 + 3*x^5 + 9*x^6 + 4*x^7 + 9*x^8 + 6*x^9 + ...
		

Crossrefs

Cf. A238872.

Programs

  • Mathematica
    f[{a_,b_,c_}]:=(a+1)(b+1)(c+1)-a*b*c; nn=80;Take[Transpose[Sort[Tally[f/@ Tuples[Range[0,nn],3]],#1[[1]]<#2[[1]]&]] [[2]],nn] (* Harvey P. Dale, Mar 05 2012 *)
    a[ n_] := Length @ FindInstance[ {x >= 0, y >= 0, z >= 0, x y + y z + z x + x + y + z + 1 == n}, {x, y, z}, Integers, 10^9]; (* Michael Somos, Jul 04 2015 *)
    a[ n_] := (2 + (-1)^n) Length @ FindInstance[ {1 <= y <= n, 1 <= x <= y, 1 <= z <= y, y^2 - (x^2 - x + z^2 - z) / 2 == n}, {x, y, z}, Integers, 10^9]; (* Michael Somos, Jul 04 2015 *)

Formula

a(2*n) = A238872(2*n) / 3 if n>0. a(2*n + 1) = A238872(2*n + 1). - Michael Somos, Jul 04 2015

A238871 Number of weakly unimodal compositions of n with absolute difference of successive parts <= 1.

Original entry on oeis.org

1, 1, 2, 4, 6, 10, 14, 21, 27, 40, 52, 70, 92, 124, 156, 206, 264, 335, 425, 539, 673, 847, 1052, 1300, 1611, 1990, 2433, 2977, 3638, 4420, 5367, 6496, 7829, 9439, 11341, 13590, 16270, 19425, 23135, 27525, 32697, 38745, 45844, 54168, 63875, 75247, 88493, 103892
Offset: 0

Views

Author

Joerg Arndt, Mar 21 2014

Keywords

Examples

			The a(8) = 27 such compositions are:
01:  [ 1 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 1 2 ]
03:  [ 1 1 1 1 1 2 1 ]
04:  [ 1 1 1 1 2 1 1 ]
05:  [ 1 1 1 1 2 2 ]
06:  [ 1 1 1 2 1 1 1 ]
07:  [ 1 1 1 2 2 1 ]
08:  [ 1 1 1 2 3 ]
09:  [ 1 1 2 1 1 1 1 ]
10:  [ 1 1 2 2 1 1 ]
11:  [ 1 1 2 2 2 ]
12:  [ 1 2 1 1 1 1 1 ]
13:  [ 1 2 2 1 1 1 ]
14:  [ 1 2 2 2 1 ]
15:  [ 1 2 2 3 ]
16:  [ 1 2 3 2 ]
17:  [ 2 1 1 1 1 1 1 ]
18:  [ 2 2 1 1 1 1 ]
19:  [ 2 2 2 1 1 ]
20:  [ 2 2 2 2 ]
21:  [ 2 3 2 1 ]
22:  [ 2 3 3 ]
23:  [ 3 2 1 1 1 ]
24:  [ 3 2 2 1 ]
25:  [ 3 3 2 ]
26:  [ 4 4 ]
27:  [ 8 ]
		

Crossrefs

A260195 Number of integer triples [x, y, z] such that 1 <= min(x,z), max(x,z) <= y, y^2 - (x^2 - x + z^2 - z) / 2 = n.

Original entry on oeis.org

0, 1, 1, 3, 2, 3, 3, 4, 3, 6, 4, 3, 5, 6, 4, 9, 5, 3, 7, 7, 5, 9, 6, 6, 8, 9, 5, 9, 8, 6, 10, 6, 5, 15, 8, 9, 10, 7, 7, 12, 10, 3, 11, 15, 7, 15, 8, 6, 13, 12, 9, 12, 9, 9, 14, 12, 7, 15, 12, 6, 15, 13, 6, 21, 12, 12, 13, 6, 11, 15, 15, 9, 14, 12, 8, 24, 10, 9
Offset: 0

Views

Author

Michael Somos, Jul 18 2015

Keywords

Comments

Same as A238872 except a(0) = 0.

Examples

			G.f. = x + x^2 + 3*x^3 + 2*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 3*x^8 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ OddQ[n], 1, 1/3] Length @ FindInstance[ {x >= 0, y >= 0, z >= 0, x y + y z + z x + x + y + z + 1 == n}, {x, y, z}, Integers, 10^9];
    a[ n_] := Length @ FindInstance[ {1 <= y <= n, 1 <= x <= y, 1 <= z <= y, y^2 - (x^2 - x + z^2 - z) / 2 == n}, {x, y, z}, Integers, 10^9];
  • PARI
    {a(n) = my(c, t, i); for(k=1 + sqrtint(max(0, n-1)), n, forstep(j=1, min(2*k, sqrtint(t = 8*k^2 - 8*n + 2)), 2, if( issquare( t - j^2, &i) && i<=2*k, c++))); c};

Formula

a(n) = A238872(n) unless n=0. a(2*n) = A130695(2*n) / 3. a(2*n + 1) = A130695(2*n + 1) = A259825(8*n + 3) / 4 = 3 * H(8*n + 3) where H() is the Hurwitz class number.
Showing 1-3 of 3 results.