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

A331529 a(n) is the number of nonnegative integers that can be represented in a 7-segment display by using only n segments (version A006942).

Original entry on oeis.org

0, 0, 1, 1, 2, 5, 7, 12, 19, 33, 59, 99, 170, 290, 496, 854, 1463, 2506, 4292, 7351, 12601, 21596, 37005, 63405, 108637, 186154, 318989, 546600, 936606, 1604874, 2749973, 4712146, 8074374, 13835600, 23707533, 40623267, 69608738, 119275933, 204381606, 350211711, 600094277
Offset: 0

Views

Author

Stefano Spezia, Jan 19 2020

Keywords

Comments

The nonnegative integers are displayed as in A006942, where a 7 is depicted by 3 segments.
Given the set S = {2, 3, 4, 5, 6, 7}, the function f defined in S as f(5) = f(6) = 3 and f(s) = 1 elsewhere, a(n) is equal to the difference between the number b(n) of S-restricted f-weighted integer compositions of n with that of n-6, i.e., b(n-6). The latter one provides the number of all those excluded cases where a nonnegative integer is displayed with leading zeros. b(n) is calculated as the sum of polynomial coefficients or extended binomial coefficients (see Equation 3 in Eger) where the index of summation is positive and it covers the numbers of possible digits that can be displayed by n segments (see first formula).
The same sequence is obtained when 7 and 9 are depicted respectively by 4 and 5 segments (A074458). - Stefano Spezia, Apr 11 2021

Examples

			a(5) = 5 since 2, 3, 5, 17 and 71 are displayed by 5 segments.
   __      __       __         __      __
   __|     __|     |__       |   |       |  |
  |__      __|      __|      |   |       |  |
   (2)     (3)      (5)       (17)       (71)
		

Crossrefs

Programs

  • Mathematica
    P[x_]:=x^2+x^3+x^4+3x^5+3x^6+x^7; b[n_]:=Coefficient[Sum[P[x]^k,{k,Max[1,Ceiling[n/7]],Floor[n/2]}],x,n];a[n_]:=b[n]-b[n-6]; Array[a,41,0]
  • PARI
    concat([0,0], Vec(x^2*(1 - x)*(1 + x)^2*(1 - x + x^2)*(1 + x + x^2)*(1 + x^2 + 2*x^3 + x^4) / (1 - x^2 - x^3 - x^4 - 3*x^5 - 3*x^6 - x^7) + O(x^41))) \\ Colin Barker, Jan 20 2020

Formula

a(n) = b(n) - b(n-6), where b(n) = [x^n] Sum_{k=max(1,ceiling(n/7))..floor(n/2)} P(x)^k with P(x) = x^2 + x^3 + x^4 + 3*x^5 + 3*x^6 + x^7.
From Colin Barker, Jan 20 2020: (Start)
G.f.: x^2*(1 - x)*(1 + x)^2*(1 - x + x^2)*(1 + x + x^2)*(1 + x^2 + 2*x^3 + x^4) / (1 - x^2 - x^3 - x^4 - 3*x^5 - 3*x^6 - x^7).
a(n) = a(n-2) + a(n-3) + a(n-4) + 3*a(n-5) + 3*a(n-6) + a(n-7) for n>13.
(End)

A343314 a(n) is the number of nonnegative integers that can be represented in a 7-segment display by using only n segments (version A063720).

Original entry on oeis.org

0, 0, 1, 1, 2, 7, 5, 16, 19, 39, 77, 103, 226, 334, 636, 1106, 1827, 3386, 5568, 10059, 17281, 29890, 52771, 90283, 159191, 274976, 479035, 835476, 1447278, 2528496, 4386143, 7640592, 13293308, 23106132, 40245277, 69946521, 121762316, 211791205, 368418674, 641125867
Offset: 0

Views

Author

Stefano Spezia, Apr 11 2021

Keywords

Comments

The nonnegative integers are displayed as in A063720.
Given the set S = {2, 3, 4, 5, 6, 7}, the function f defined in S as f(5) = 5 and f(s) = 1 elsewhere, a(n) is equal to the difference between the number b(n) of S-restricted f-weighted integer compositions of n with that of n-6, i.e., b(n-6). The latter one provides the number of all those excluded cases where a nonnegative integer is displayed with leading zeros. b(n) is calculated as the sum of polynomial coefficients or extended binomial coefficients (see Equation 3 in Eger) where the index of summation is positive and it covers the numbers of possible digits that can be displayed by n segments (see third formula).

Examples

			a(6) = 5 since 0, 14, 41, 77 and 111 are displayed by 6 segments.
    __                                   __   __
   |  |      | |__|      |__|    |         |    |      |    |    |
   |__|      |    |         |    |         |    |      |    |    |
    (0)       (14)          (41)            (77)          (111)
		

Crossrefs

Programs

  • Mathematica
    P[x_]:=x^2+x^3+x^4+5x^5+x^6+x^7; b[n_]:=Coefficient[Sum[P[x]^k, {k, Max[1, Ceiling[n/7]], Floor[n/2]}], x, n]; a[n_]:=b[n]-b[n-6]; Array[a, 40, 0]

Formula

G.f.: x^2*(1 - x)*(1 + x)*(1 - x + x^2)*(1 + x + x^2)*(1 + x + x^2 + 5*x^3 + x^4 + x^5)/(1 - x^2 - x^3 - x^4 - 5*x^5 - x^6 - x^7).
a(n) = a(n-2) + a(n-3) + a(n-4) + 5*a(n-5) + a(n-6) + a(n-7) for n > 13.
a(n) = b(n) - b(n-6), where b(n) = [x^n] Sum_{k=max(1,ceiling(n/7))..floor(n/2)} P(x)^k with P(x) = x^2 + x^3 + x^4 + 5*x^5 + x^6 + x^7.

A343315 a(n) is the number of nonnegative integers that can be represented in a 7-segment display by using only n segments (version A277116).

Original entry on oeis.org

0, 0, 1, 1, 2, 6, 6, 14, 19, 36, 67, 103, 194, 315, 560, 971, 1651, 2895, 4933, 8581, 14798, 25515, 44165, 76067, 131563, 227034, 392032, 677152, 1168742, 2018769, 3485255, 6018422, 10392472, 17943750, 30985861, 53501944, 92385050, 159523542, 275451221, 475633952
Offset: 0

Views

Author

Stefano Spezia, Apr 11 2021

Keywords

Comments

The nonnegative integers are displayed as in A277116.
Given the set S = {2, 3, 4, 5, 6, 7}, the function f defined in S as f(5) = 4, f(6) = 2 and f(s) = 1 elsewhere, a(n) is equal to the difference between the number b(n) of S-restricted f-weighted integer compositions of n with that of n-6, i.e., b(n-6). The latter one provides the number of all those excluded cases where a nonnegative integer is displayed with leading zeros. b(n) is calculated as the sum of polynomial coefficients or extended binomial coefficients (see Equation 3 in Eger) where the index of summation is positive and it covers the numbers of possible digits that can be displayed by n segments (see third formula).

Examples

			a(5) = 6 since 2, 3, 5, 9, 17 and 71 are displayed by 5 segments.
   __        __        __        __          __       __
   __|       __|      |__       |__|      |    |        |    |
  |__        __|       __|         |      |    |        |    |
   (2)       (3)       (5)       (9)       (17)          (71)
		

Crossrefs

Programs

  • Mathematica
    P[x_]:=x^2+x^3+x^4+4x^5+2x^6+x^7; b[n_]:=Coefficient[Sum[P[x]^k, {k, Max[1, Ceiling[n/7]], Floor[n/2]}], x, n]; a[n_]:=b[n]-b[n-6]; Array[a, 40, 0]

Formula

G.f.: x^2*(1 - x)*(1 + x)*(1 - x + x^2)*(1 + x + x^2)*(1 + x + x^2 + 4*x^3 + 2*x^4 + x^5)/(1 - x^2 - x^3 - x^4 - 4*x^5 - 2*x^6 - x^7).
a(n) = a(n-2) + a(n-3) + a(n-4) + 4*a(n-5) + 2*a(n-6) + a(n-7) for n > 13.
a(n) = b(n) - b(n-6), where b(n) = [x^n] Sum_{k=max(1,ceiling(n/7))..floor(n/2)} P(x)^k with P(x) = x^2 + x^3 + x^4 + 4*x^5 + 2*x^6 + x^7.

A350177 a(n) is the number of nonnegative integers that can be represented by lighting only n segments on a 9-segment display, used by the Russian postal service.

Original entry on oeis.org

0, 0, 0, 2, 3, 2, 5, 13, 17, 22, 47, 86, 127, 211, 387, 645, 1044, 1794, 3086, 5135, 8608, 14674, 24805, 41631, 70322, 119069, 200768, 338429, 571845, 965823, 1629253, 2749904, 4643876, 7838862, 13229487, 22333638, 37704236, 63642469, 107427241, 181351098, 306133271
Offset: 0

Views

Author

Stefano Spezia, Dec 18 2021

Keywords

Comments

The nonnegative integers are displayed as in A350131.
Given the set S = {3, 4, 5, 6, 7}, the function f defined in S as f(3) = f(5) = 2, f(4) = 3, and f(6) = f(7) = 1, a(n) is equal to the difference between the number b(n) of S-restricted f-weighted integer compositions of n with that of n-6, i.e., b(n-6). The latter one provides the number of all those excluded cases where a nonnegative integer is displayed with leading zeros. b(n) is calculated as the sum of polynomial coefficients or extended binomial coefficients (see Equation 3 in Eger) where the index of summation is positive and it covers the numbers of possible digits that can be displayed by n segments (see first formula).

Examples

			a(6) = 5 since 0, 11, 17, 71 and 77 are displayed by 6 segments.
   _                 _    _        _  _
  | |    /| /|    /| /    /  /|    /  /
  |_|     |  |     | |    |   |    |  |
  (0)     (11)    (17)     (71)    (77)
		

Crossrefs

Programs

  • Mathematica
    P[x_]:=2x^3+3x^4+2x^5+x^6+x^7; b[n_]:=Coefficient[Sum[P[x]^k, {k, Max[1, Ceiling[n/7]], Floor[n/2]}], x, n]; a[n_]:=b[n]-b[n-6]; Array[a, 41, 0]

Formula

a(n) = b(n) - b(n-6), where b(n) = [x^n] Sum_{k=max(1,ceiling(n/7))..floor(n/2)} P(x)^k with P(x) = 2*x^3 + 3*x^4 + 2*x^5 + x^6 + x^7.
G.f.: x^3*(1 - x)*(1 + x)*(1 - x + x^2)*(1 + x + x^2)*(2 + 3*x + 2*x^2 + x^3 + x^4)/(1 - 2*x^3 - 3*x^4 - 2*x^5 - x^6 - x^7).
a(n) = 2*a(n-3) + 3*a(n-4) + 2*a(n-5) + a(n-6) + a(n-7) for n > 13.

A350438 a(n) is the number of integers that can be represented in a 7-segment display by using only n segments (version A010371).

Original entry on oeis.org

0, 0, 1, 1, 3, 6, 11, 14, 23, 39, 71, 118, 195, 317, 537, 906, 1533, 2550, 4261, 7119, 11973, 20073, 33650, 56277, 94286, 157960, 264843, 443656, 743269, 1244915, 2085970, 3494922, 5855965, 9810370, 16436113, 27536138, 46135634, 77295509, 129501787, 216963199, 363500178
Offset: 0

Views

Author

Stefano Spezia, Dec 31 2021

Keywords

Comments

The integers are displayed as in A010371, where a 7 is depicted by 4 segments. The negative integers are depicted by using 1 segment more for the minus sign.
Since the integer 0 is depicted by 6 segments, in order to avoid considering -0 in the case n = 7, a(7) is obtained by decreasing of a unit the result of the sum A331530(7) + A331530(6) = 7 + 8 = 15, i.e., a(7) = 15 - 1 = 14.

Examples

			a(7) = 14 since -111, -71, -41, -17, -14, -9, -6, 8, 12, 13, 15, 21, 31 and 51 are displayed by 7 segments.
                      __                              __
  __   |  |  |    __ |  |  |    __ |__|  |    __   | |  |    __   | |__|
       |  |  |          |  |          |  |         |    |         |    |
       (-111)        (-71)         (-41)          (-17)          (-14)
      __         __      __        __        __        __     __
  __ |__|    __ |__     |__|    |  __|    |  __|    | |__     __|  |
      __|       |__|    |__|    | |__     |  __|    |  __|   |__   |
    (-9)       (-6)     (8)      (12)      (13)      (15)      (21)
  __         __
  __|  |    |__   |
  __|  |     __|  |
   (31)       (51)
		

Crossrefs

Programs

  • Mathematica
    P[x_]:=x^2+2x^4+3x^5+3x^6+x^7; c[n_]:=Coefficient[Sum[P[x]^k, {k, Max[1, Ceiling[n/7]], Floor[n/2]}], x, n]; b[n_]:=c[n]-c[n-6]; (* A331530 *)
    a[n_]:=If[n!=7,b[n]+b[n-1],14]; Array[a, 41, 0]

Formula

a(7) = 14, otherwise a(n) = A331530(n) + A331530(n-1).
G.f.: x^2*(1 + x + 2*x^2 + 5*x^3 + 6*x^4 + 3*x^5 -2x^8- 3*x^9 - 3*x^10 - x^11)/(1 - x^2 -2 x^4 - 3*x^5 - 3*x^6 - x^7).
a(n) = a(n-2) + 2*a(n-4) + 3*a(n-5) + 3*a(n-6) + a(n-7) for n > 13.
Showing 1-5 of 5 results.