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

A066777 First differences of Stern's sequence A005230.

Original entry on oeis.org

0, 1, 1, 3, 5, 9, 20, 37, 71, 137, 285, 550, 1080, 2123, 4175, 8498, 16711, 33137, 65724, 130368, 258613, 521549, 1034600, 2060702, 4104693, 8176249, 16286774, 32443180, 65149296, 129777043, 259032537, 517030474, 1032000246, 2059895799, 4111615349
Offset: 0

Views

Author

N. J. A. Sloane, Jul 04 2002

Keywords

Crossrefs

Cf. A005230.

Programs

  • Mathematica
    A066777list[nmax_]:=Differences[Nest[Append[#,Total[Take[#,-Ceiling[(Sqrt[8Length[#]+1]-1)/2]]]]&,{1},nmax+1]];A066777list[35] (* Paolo Xausa, Sep 28 2023 *)

Formula

a(n) = A005230(n+2) - A005230(n+1). - Paolo Xausa, Sep 28 2023

A096858 Triangle read by rows in which row n gives the n-set obtained as the differences {b(n)-b(n-i), 0 <= i <= n-1}, where b() = A005318().

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 3, 5, 6, 7, 6, 9, 11, 12, 13, 11, 17, 20, 22, 23, 24, 20, 31, 37, 40, 42, 43, 44, 40, 60, 71, 77, 80, 82, 83, 84, 77, 117, 137, 148, 154, 157, 159, 160, 161, 148, 225, 265, 285, 296, 302, 305, 307, 308, 309, 285, 433, 510, 550, 570, 581, 587, 590, 592, 593, 594
Offset: 1

Views

Author

N. J. A. Sloane, Aug 18 2004

Keywords

Comments

It is conjectured that the triangle has the property that all 2^n subsets of row n have distinct sums. This conjecture was proved by T. Bohman in 1996 - N. J. A. Sloane, Feb 09 2012
It is also conjectured that in some sense this triangle is optimal. See A005318 for further information and additional references.

Examples

			The triangle begins:
{1}
{1,2}
{2,3,4}
{3,5,6,7}
{6,9,11,12,13}
{11,17,20,22,23,24}
{20,31,37,40,42,43,44}
{40,60,71,77,80,82,83,84}
{77,117,137,148,154,157,159,160,161}
{148,225,265,285,296,302,305,307,308,309}
{285,433,510,550,570,581,587,590,592,593,594}
{570,855,1003,1080,1120,1140,1151,1157,1160,1162,1163,1164}
{1120,1690,1975,2123,2200,2240,2260,2271,2277,2280,2282,2283,2284}
{2200,3320,3890,4175,4323,4400,4440,4460,4471,4477,4480,4482,4483,4484}
{4323,6523,7643,8213,8498,8646,8723,8763,8783,8794,8800,8803,8805,8806,8807}
		

References

  • J. H. Conway and R. K. Guy, Solution of a problem of Erdős, Colloq. Math. 20 (1969), p. 307.
  • R. K. Guy, Sets of integers whose subsets have distinct sums, pp. 141-154 of Theory and practice of combinatorics. Ed. A. Rosa, G. Sabidussi and J. Turgeon. Annals of Discrete Mathematics, 12. North-Holland 1982.
  • R. K. Guy, Unsolved Problems in Number Theory, C8.

Crossrefs

Cf. A005318, A005230 (column 1 of triangle).

Programs

  • Maple
    b:= proc(n) option remember;
          `if`(n<2, n, 2*b(n-1) -b(n-1-floor(1/2 +sqrt(2*n-2))))
        end:
    T:= n-> seq(b(n)-b(n-i), i=1..n):
    seq(T(n), n=1..15);  # Alois P. Heinz, Nov 29 2011
  • Mathematica
    b[n_] := b[n] = If[n < 2, n, 2*b[n-1] - b[n-1-Floor[1/2 + Sqrt[2*n-2]]]]; t[n_] := Table[b[n] - b[n-i], {i, 1, n}]; Table[t[n], {n, 1, 15}] // Flatten (* Jean-François Alcover, Jan 14 2014, after Alois P. Heinz *)

Extensions

Typo in definition (limits on i were wrong) corrected and reference added to Bohman's paper. N. J. A. Sloane, Feb 09 2012

A023536 Convolution of natural numbers with A023532.

Original entry on oeis.org

1, 2, 4, 7, 10, 14, 19, 25, 31, 38, 46, 55, 65, 75, 86, 98, 111, 125, 140, 155, 171, 188, 206, 225, 245, 266, 287, 309, 332, 356, 381, 407, 434, 462, 490, 519, 549, 580, 612, 645, 679, 714, 750, 786, 823, 861, 900, 940, 981, 1023, 1066, 1110, 1155
Offset: 1

Views

Author

Keywords

Comments

From Vladimir Letsko, Dec 18 2016: (Start)
Also, a(n) is the number of possible values for the number of diagonals in a convex polyhedron with n+3 vertices.
Let v>4 denote the number of vertices of convex polyhedra. The set of possible numbers of diagonals is the union of sets {(k-1)(v-k-4), ..., (k-1)(v-(k+6)/2)}, where 1 <= k <= floor((sqrt(8v-15)-5)/2), and the set {(k-1)(v-k-4), ..., (v-3)(v-4)/2}, where k = floor((sqrt(8v-15)-3)/2). Note that cardinalities of all sets of this union excluding the last one are consecutive triangular numbers. (End)

Crossrefs

Programs

  • Mathematica
    A023536[n_] := n*(n + 5)/2 - 2 - Sum[Round[Sqrt[2*k + 4]], {k, 2, n}];
    Array[A023536, 60] (* Paolo Xausa, Feb 28 2025 *)
  • Python
    from math import comb, isqrt
    def A023536(n): return comb(n+2,2)-sum(isqrt((k<<3)+1)-1>>1 for k in range(1,n+2)) # Chai Wah Wu, Feb 27 2025

Formula

a(n) = (n(n + 5) - 4 )/2 - Sum_{k=2..n} floor(1/2 + sqrt(2(k + 2))). - Jan Hagberg (jan.hagberg(AT)stat.su.se), Oct 16 2002
From Paul Barry, May 24 2004: (Start)
a(n) = (n+1)(n+2)/2 - Sum_{k=1..n+1} floor((sqrt(8k+1)-1)/2);
a(n) = Sum_{k=1..n+1} k-floor((sqrt(8k+1)-1)/2). (End)

Extensions

Corrected by Jan Hagberg (jan.hagberg(AT)stat.su.se), Oct 16 2002

A225178 The generalized Conway-Guy sequence d_2(n).

Original entry on oeis.org

1, 2, 6, 16, 48, 140, 408, 1224, 3640, 10824, 32192, 96576, 288912, 864288, 2585584, 7735104, 23205312, 69551552, 208461504, 624806688, 1872691488, 5612903296, 16838709888, 50500659456, 151455567744, 454227600128, 1362265877376
Offset: 1

Views

Author

N. J. A. Sloane, May 02 2013

Keywords

Crossrefs

Programs

  • Maple
    b := proc(n)
        round(sqrt(2*n-2)) ;
    end proc:
    d := proc(k,n)
        option remember;
        if n = 1 then
            1;
        else
            add( k*procname(k,i),i=n-b(n)..n-1 ) ;
        end if;
    end proc:
    A225178 := proc(n)
        d(2,n) ;
    end proc: # R. J. Mathar, Jul 09 2013
  • Mathematica
    b[n_] := Round[Sqrt[2n-2]];
    d[k_, n_] := d[k, n] = If[n == 1, 1, Sum[k*d[k, i], {i, n-b[n], n-1}]];
    a[n_] := d[2, n];
    Table[a[n], {n, 1, 27}] (* Jean-François Alcover, Feb 27 2024, after R. J. Mathar *)

Formula

Bae and Choi define this sequence via a collection of recurrences.

A014172 Apply partial sum operator twice to Stern's sequence.

Original entry on oeis.org

1, 3, 7, 14, 27, 51, 95, 179, 340, 649, 1243, 2407, 4691, 9175, 17982, 35287, 69588, 137596, 272448, 539868, 1070224, 2122129, 4217132, 8389833, 16700934, 33255128, 66228664, 131908316
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A005230.

A014173 Apply partial sum operator thrice to Stern's sequence.

Original entry on oeis.org

1, 4, 11, 25, 52, 103, 198, 377, 717, 1366, 2609, 5016, 9707, 18882, 36864, 72151, 141739, 279335, 551783, 1091651, 2161875, 4284004, 8501136, 16890969, 33591903, 66847031, 133075695, 264984011
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A005230.

A014175 Apply partial sum operator 4 times to Stern's sequence.

Original entry on oeis.org

1, 5, 16, 41, 93, 196, 394, 771, 1488, 2854, 5463, 10479, 20186, 39068, 75932, 148083, 289822, 569157, 1120940, 2212591, 4374466, 8658470, 17159606, 34050575, 67642478, 134489509, 267565204, 532549215
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A005230.

A132156 Sum of all n-digit Stern numbers.

Original entry on oeis.org

13, 148, 1003, 16141, 117547, 917053, 15502289, 114274754, 909482399, 15471962269, 115061008452, 917885746619, 15675637954053, 116877859994048, 933643385166035, 15975162211603393, 119196492782053456, 952870691477908028, 16319572144410372393, 121792577413939691253
Offset: 1

Views

Author

Parthasarathy Nambi, Nov 01 2007

Keywords

Examples

			Sum of all 1-digit Stern numbers is 1 + 1 + 2 + 3 + 6 = 13.
Sum of all 2-digit Stern numbers is 11 + 20 + 40 + 77 = 148.
Sum of all 3-digit Stern numbers is 148 + 285 + 570 = 1003.
		

Crossrefs

Cf. A005230.

Programs

  • Mathematica
    stern[1] = 1; stern[n_] := stern[n] = Sum[stern[k], {k, n - Ceiling[(Sqrt[8*n -7]-1)/2], n-1}]; digNum[n_] := Length @ IntegerDigits[n]; digCount = 0; sum = 0; cumsum = {}; Do[s = stern[n]; If[digNum[s] > digCount, digCount++; AppendTo[cumsum, sum]]; sum += s, {n, 1, 25}]; Differences[cumsum] (* Amiram Eldar, Nov 30 2019 *)

Extensions

More terms from Amiram Eldar, Nov 30 2019
Showing 1-8 of 8 results.