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-10 of 15 results. Next

A250256 Least positive integer whose decimal digits divide the plane into n regions (A249572 variant).

Original entry on oeis.org

1, 6, 8, 68, 88, 688, 888, 6888, 8888, 68888, 88888, 688888, 888888, 6888888, 8888888, 68888888, 88888888, 688888888, 888888888, 6888888888, 8888888888, 68888888888, 88888888888, 688888888888, 888888888888, 6888888888888, 8888888888888, 68888888888888
Offset: 1

Views

Author

Rick L. Shepherd, Nov 15 2014

Keywords

Comments

Equivalently, with offset 0, least positive integer with n holes in its decimal digits. Leading zeros are not permitted. Variation of A249572 with the numeral "4" considered open at the top, as it is often handwritten. See also the comments in A249572.
For n > 2, a(n) + a(n+1) divides the plane into 2 regions. For n > 1, a(2n) - a(2n-1) divides the plane into n+1 regions. For n >= 1, a(2n+1) - a(2n) divides the plane into n regions. - Ivan N. Ianakiev, Feb 23 2015

Examples

			The integer 68, whose decimal digits have 3 holes, divides the plane into 4 regions. No smaller positive integer does this, so a(4) = 68.
		

Crossrefs

Programs

  • Magma
    I:=[1,6,8,68]; [n le 4 select I[n] else 10*Self(n-2)+8: n in [1..30]]; // Vincenzo Librandi, Nov 15 2014
  • Mathematica
    Join[{1, 6, 8}, RecurrenceTable[{a[1]==68, a[2]==88, a[n]==10 a[n-2] + 8}, a, {n, 20}]] (* Vincenzo Librandi, Nov 16 2014 *)

Formula

a(n) = 10*a(n-2) + 8 for n >= 4.
From Chai Wah Wu, Jul 12 2016: (Start)
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) for n > 4.
G.f.: x*(10*x^3 - 8*x^2 + 5*x + 1)/((x - 1)*(10*x^2 - 1)). (End)
E.g.f.: (9 + 45*x - 40*cosh(x) + 31*cosh(sqrt(10)*x) - 40*sinh(x) + 4*sqrt(10)*sinh(sqrt(10)*x))/45. - Stefano Spezia, Aug 11 2025

A259573 Number of distinct differences in row n of the reciprocity array of 0.

Original entry on oeis.org

1, 2, 3, 4, 3, 4, 3, 6, 5, 6, 3, 8, 3, 6, 7, 8, 3, 8, 3, 8, 9, 6, 3, 12, 5, 6, 7, 10, 3, 14, 3, 10, 9, 6, 9, 14, 3, 6, 9, 12, 3, 12, 3, 12, 11, 6, 3, 18, 5, 10, 9, 12, 3, 12, 9, 14, 9, 6, 3, 22, 3, 6, 13, 12, 9, 14, 3, 12, 9, 14, 3, 18, 3, 6, 13, 12, 9, 16
Offset: 1

Views

Author

Clark Kimberling, Jun 30 2015

Keywords

Comments

The "reciprocity law" that Sum_{k=0..m} [(n*k+x)/m] = Sum_{k=0..n} [(m*k+x)/n] where x is a real number and m and n are positive integers, is proved in Section 3.5 of Concrete Mathematics (see References).

Examples

			In the array at A259572, row 4 is (0,2,3,6,6,8,9,12,12,14,15,...), with differences (2,1,3,0,2,1,3,0,2,1,3,0, ...), and distinct differences {0,1,2,3}, so that a(4) = 4. Example corrected by _Antti Karttunen_, Nov 30 2021
		

References

  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, Addison-Wesley, 1989, pages 90-94.

Crossrefs

Programs

  • Mathematica
    x = 0;  s[m_, n_] := Sum[Floor[(n*k + x)/m], {k, 0, m - 1}];
    t[m_] := Table[s[m, n], {n, 1, 1000}];
    u = Table[Length[Union[Differences[t[m]]]], {m, 1, 120}]  (* A259573 *)
  • PARI
    A259572(m,n) = ((m*n - m - n + gcd(m,n))/2); \\ After Witold Dlugosz's formula for A259572.
    A259573(n) = #Set(vector(n,k,A259572(n,1+k)-A259572(n,k))); \\ Antti Karttunen, Nov 30 2021

A259576 Number of distinct differences in row n of the reciprocity array of 1.

Original entry on oeis.org

1, 2, 1, 2, 3, 4, 3, 4, 3, 6, 3, 6, 3, 6, 5, 6, 3, 8, 3, 8, 5, 6, 3, 10, 5, 6, 5, 10, 3, 10, 3, 8, 5, 6, 7, 14, 3, 6, 5, 12, 3, 12, 3, 10, 11, 6, 3, 14, 5, 10, 5, 10, 3, 12, 9, 12, 5, 6, 3, 18, 3, 6, 11, 10, 9, 14, 3, 10, 5, 16, 3, 18, 3, 6, 9, 10, 7, 14, 3
Offset: 1

Views

Author

Clark Kimberling, Jul 01 2015

Keywords

Comments

The "reciprocity law" that Sum_{k=0..m} [(n*k+x)/m] = Sum_{k=0..n} [(m*k+x)/n] where x is a real number and m and n are positive integers, is proved in Section 3.5 of Concrete Mathematics (see References). See A259572 for a guide to related sequences.

Examples

			In the array at A259575, row 6 is (1,3,6,8,11,15,16,18,...), with differences (2,3,2,3,4,1,2,...), and distinct differences {1,2,3,4}, so that a(6) = 4.
		

References

  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, Addison-Wesley, 1989, pages 90-94.

Crossrefs

Programs

  • Mathematica
    x = 1;  s[m_, n_] := Sum[Floor[(n*k + x)/m], {k, 0, m - 1}];
    t[m_] := Table[s[m, n], {n, 1, 1000}];
    u = Table[Length[Union[Differences[t[m]]]], {m, 1, 120}]  (* A259576 *)
  • PARI
    A259575sq(m,n) = sum(k=0,m-1,(1+(n*k))\m);
    A259576(n) = #Set(vector(n,k,A259575sq(n,1+k)-A259575sq(n,k))); \\ Antti Karttunen, Mar 02 2023

A259579 Number of distinct differences in row n of the reciprocity array of 2.

Original entry on oeis.org

1, 2, 3, 2, 1, 4, 3, 4, 5, 4, 3, 6, 3, 4, 5, 6, 3, 6, 3, 6, 7, 6, 3, 10, 3, 6, 7, 8, 3, 12, 3, 8, 9, 6, 5, 12, 3, 6, 9, 10, 3, 12, 3, 10, 9, 6, 3, 16, 5, 8, 9, 10, 3, 10, 5, 10, 9, 6, 3, 20, 3, 6, 9, 10, 5, 14, 3, 10, 9, 12, 3, 16, 3, 6, 11, 10, 9, 14, 3, 14
Offset: 1

Views

Author

Clark Kimberling, Jul 17 2015

Keywords

Comments

The "reciprocity law" that Sum_{k=0..m} [(n*k+x)/m] = Sum_{k=0..n} [(m*k+x)/n] where x is a real number and m and n are positive integers, is proved in Section 3.5 of Concrete Mathematics (see References). See A259572 for a guide to related sequences.

Examples

			In the array at A259578, row 6 is (2,5,6,10,12,15,17,20,21,25,27,...), with differences (3,1,4,2,3,2,3,1,4,2,...), and distinct differences {1,2,3,4}, so that a(6) = 4.
		

References

  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, Addison-Wesley, 1989, pages 90-94.

Crossrefs

Programs

  • Mathematica
    x = 2;  s[m_, n_] := Sum[Floor[(n*k + x)/m], {k, 0, m - 1}];
    t[m_] := Table[s[m, n], {n, 1, 1000}];
    u = Table[Length[Union[Differences[t[m]]]], {m, 1, 120}]

A259582 Number of distinct differences in row n of the reciprocity array of 3.

Original entry on oeis.org

1, 2, 3, 4, 3, 4, 1, 4, 3, 4, 3, 6, 3, 4, 7, 6, 3, 6, 3, 6, 5, 6, 3, 8, 5, 6, 5, 8, 3, 8, 3, 8, 7, 6, 5, 10, 3, 6, 9, 8, 3, 12, 3, 12, 9, 6, 3, 14, 3, 8, 9, 12, 3, 10, 9, 10, 9, 6, 3, 18, 3, 6, 7, 10, 9, 14, 3, 12, 9, 12, 3, 14, 3, 6, 13, 12, 5, 14, 3, 14, 7
Offset: 1

Views

Author

Clark Kimberling, Jul 15 2015

Keywords

Comments

The "reciprocity law" that Sum_{k=0..m} [(n*k+x)/m] = Sum_{k=0..n} [(m*k+x)/n] where x is a real number and m and n are positive integers, is proved in Section 3.5 of Concrete Mathematics (see References). See A259572 for a guide to related sequences.

Examples

			In the array at A259581, row 4 is (3,4,6,6,9,10,12,12,15,16,...), with differences (1,2,0,3,1,2,2,3,1,...), and distinct differences {0,1,2,3}, so that a(4) = 4.
		

References

  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, Addison-Wesley, 1989, pages 90-94.

Crossrefs

Programs

  • Mathematica
    x = 3; s[m_, n_] := Sum[Floor[(n*k + x)/m], {k, 0, m - 1}];
    t[m_] := Table[s[m, n], {n, 1, 1000}];
    Table[Length[Union[Differences[t[m]]]], {m, 1, 120}]

A327820 Smallest prime with n holes in its decimal digits.

Original entry on oeis.org

2, 19, 83, 89, 809, 1889, 4889, 46889, 48889, 468889, 688889, 3888889, 4888889, 28888889, 88884889, 288888889, 808888889, 4488888889, 8688888889, 48808888889, 48888888889, 288888888889, 888088888889, 1888888888889, 4888888888889, 48808888888889, 88848888888889
Offset: 0

Views

Author

Andrew Heathwaite, Sep 26 2019

Keywords

Comments

Smallest prime p such that A064692(p) = n. Also record-holders in A327462. - Felix Fröhlich, Sep 27 2019
The sequence is not monotonically increasing: a(32) > a(33). - Giovanni Resta, Sep 27 2019

Crossrefs

Programs

  • Mathematica
    s[0] = {1,2,3,5,7}; s[1] = {0,4,6,9}; s[2] = {8}; m[{sn_, t_}] := Union[Sort /@ Tuples[s[sn], {t}]]; f[nd_, nh_] := Block[{v, pa = Tally /@ IntegerPartitions[ nh, {nd}, {0, 1, 2}], bst = Infinity}, Do[v = Flatten /@ Tuples[m /@ p]; Do[z = Select[ FromDigits /@ Select[ Permutations[e], First[#] > 0 && OddQ[Last[#]] &], PrimeQ]; bst = Min[bst, {z}], {e, v}], {p, pa}]; bst]; a[0]=2; a[n_] := Block[{nd = Ceiling[(n + 1)/2], b}, While[! IntegerQ@ (b = f[nd, n]), nd++]; b]; a /@ Range[0, 30] (* Giovanni Resta, Sep 27 2019 *)
  • PARI
    count_holes(n) = my(d=digits(n), i=0); for(k=1, #d, if(d[k]==0 || d[k]==4 || d[k]==6 || d[k]==9, i++, if(d[k]==8, i+=2))); i
    a(n) = forprime(p=1, , if(count_holes(p)==n, return(p))) \\ Felix Fröhlich, Sep 27 2019

Extensions

a(7) corrected and more terms added by Felix Fröhlich, Sep 27 2019
More terms from Giovanni Resta, Sep 27 2019

A250257 Least nonnegative integer whose decimal digits divide the plane into n regions.

Original entry on oeis.org

1, 0, 8, 48, 88, 488, 888, 4888, 8888, 48888, 88888, 488888, 888888, 4888888, 8888888, 48888888, 88888888, 488888888, 888888888, 4888888888, 8888888888, 48888888888, 88888888888, 488888888888, 888888888888, 4888888888888, 8888888888888, 48888888888888
Offset: 1

Views

Author

Rick L. Shepherd, Nov 15 2014

Keywords

Comments

Equivalently, with offset 0, least nonnegative integer with n holes in its decimal digits. Leading zeros are not permitted. Identical to A249572 except that a(2) = 0, not 4. See also the comments in A249572.

Examples

			The integer 48, whose decimal digits have 3 holes, divides the plane into 4 regions. No smaller nonnegative integer does this, so a(4) = 48.
		

Crossrefs

Programs

  • Magma
    I:=[1,0,8,48,88]; [n le 5 select I[n] else 10*Self(n-2)+8: n in [1..30]]; // Vincenzo Librandi, Nov 15 2014
  • Mathematica
    Join[{1, 0, 8}, RecurrenceTable[{a[1]==48, a[2]==88, a[n]==10 a[n-2] + 8}, a, {n, 20}]] (* Vincenzo Librandi, Nov 16 2014 *)

Formula

a(n) = 10*a(n-2) + 8 for n >= 5.
From Chai Wah Wu, Jul 12 2016: (Start)
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) for n > 5.
G.f.: x*(-40*x^4 + 50*x^3 - 2*x^2 - x + 1)/((x - 1)*(10*x^2 - 1)). (End)

A250258 Least nonnegative integer whose decimal digits divide the plane into n regions (A250257 variant).

Original entry on oeis.org

1, 0, 8, 68, 88, 688, 888, 6888, 8888, 68888, 88888, 688888, 888888, 6888888, 8888888, 68888888, 88888888, 688888888, 888888888, 6888888888, 8888888888, 68888888888, 88888888888, 688888888888, 888888888888, 6888888888888, 8888888888888, 68888888888888
Offset: 1

Views

Author

Rick L. Shepherd, Nov 15 2014

Keywords

Comments

Equivalently, with offset 0, least nonnegative integer with n holes in its decimal digits. Leading zeros are not permitted. Variation of A250257 with the numeral "4" considered open at the top, as it is often handwritten. See also the comments in A249572.

Examples

			The integer 68, whose decimal digits have 3 holes, divides the plane into 4 regions. No smaller nonnegative integer does this, so a(4) = 68.
		

Crossrefs

Programs

  • Magma
    I:=[1,0,8,68,88]; [n le 5 select I[n] else 10*Self(n-2)+8: n in [1..40]]; // Vincenzo Librandi, Nov 16 2014
  • Mathematica
    Join[{1, 0, 8}, RecurrenceTable[{a[1]==68, a[2]==88, a[n]==10 a[n-2] + 8}, a, {n, 20}]] (* Vincenzo Librandi, Nov 16 2014 *)

Formula

a(n) = 10*a(n-2) + 8 for n >= 5.
a(n) = A250256(n), n<>2.
From Chai Wah Wu, Jul 12 2016: (Start)
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) for n > 5.
G.f.: x*(-60*x^4 + 70*x^3 - 2*x^2 - x + 1)/((x - 1)*(10*x^2 - 1)). (End)

A327462 Number of holes in decimal expansion of n-th prime.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 27 2019

Keywords

Comments

This is A064692 restricted to the primes.

Crossrefs

Programs

  • PARI
    forprime (p=2, 439, print1 (vecsum(apply(d -> [1, 0, 0, 0, 1, 0, 1, 0, 2, 1][1+d], digits(p))) ", ")) \\ Rémy Sigrist, Sep 27 2019

A279193 Least positive integer whose decimal digits divide the plane into n regions (version for people who write 2 with a curlicue).

Original entry on oeis.org

1, 2, 8, 28, 88, 288, 888, 2888, 8888, 28888, 88888, 288888, 888888, 2888888, 8888888, 28888888, 88888888, 288888888, 888888888, 2888888888, 8888888888, 28888888888, 88888888888, 288888888888, 888888888888, 2888888888888, 8888888888888, 28888888888888
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2016, following a suggestion from Colin Stewart

Keywords

Comments

Equivalently, with offset 0, least positive integer with n holes in its decimal digits. Note that 2 written with a curlicue has one hole, 8 has two holes, 28 has three holes, etc., as in the illustration. See A249572 and A250256 for other versions.

Crossrefs

See A249572, A250256 for other versions.

Programs

  • Magma
    I:=[1,2,8,28]; [n le 4 select I[n] else Self(n-1)+10*Self(n-2)-10*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Dec 15 2016
  • Mathematica
    Join[{1}, LinearRecurrence[{1, 10, -10}, {2, 8, 28}, 30]] (* Vincenzo Librandi, Dec 15 2016 *)

Formula

From Chai Wah Wu, Dec 14 2016: (Start)
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) for n>4.
G.f.: x*(10*x^3 - 4*x^2 + x + 1)/((x - 1)*(10*x^2 - 1)). (End)
a(n) = ((26 - (13 - 4*sqrt(10))*(1 - (-1)^n))*sqrt(10^n) - 80)/90 for n>1, a(1)=1. - Bruno Berselli, Dec 15 2016
Showing 1-10 of 15 results. Next