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.

User: Graham Holmes

Graham Holmes's wiki page.

Graham Holmes has authored 3 sequences.

A373641 The number of positive n-digit integers whose digit product is n.

Original entry on oeis.org

1, 2, 3, 10, 5, 36, 7, 120, 45, 90, 0, 924, 0, 182, 210, 3860, 0, 3060, 0, 3800, 420, 0, 0, 61824, 300, 0, 3627, 10584, 0, 25230, 0, 375968, 0, 0, 1190, 441000, 0, 0, 0, 426400, 0, 70602, 0, 0, 44550, 0, 0, 11936496, 1176, 58800, 0, 0, 0, 1491102, 0, 1638560
Offset: 1

Author

Graham Holmes, Jun 12 2024

Keywords

Comments

Trivially, for the four single-digit primes p, a(p)=p.
It's not possible by definition to have a digit product equal to a prime number greater than 10, so a(p)=0 for prime p > 10.

Examples

			a(4) = 10: 1114, 1122, 1141, 1212, 1221, 1411, 2112, 2121, 2211, 4111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t, i) option remember; `if`(n=1, 1/t!, `if`(i<2, 0,
          add(b(n/i^j, t-j, i-1)/j!, j=0..padic[ordp](n, i))))
        end:
    a:= n-> n!*b(n$2, 9):
    seq(a(n), n=1..56);  # Alois P. Heinz, Jun 12 2024

Formula

a(n) = 0 <=> n in { A068191 }.
a(n) > 0 <=> n in { A002473 }.
a(n) = A163767(n) for n <= 9.

A339700 a(n) is the n-th nonnegative number to light exactly n segments when displayed on a calculator.

Original entry on oeis.org

71, 77, 47, 61, 70, 52, 62, 99, 136, 190, 246, 263, 306, 589, 882, 1085, 1838, 2059, 2308, 2869, 5886, 8689, 10800, 18098, 20268, 20896, 28608, 58880, 86886, 106898, 180889, 200858, 208698, 283888, 588868, 868880, 1068889, 1808886, 2008086, 2086868, 2809888, 5888808, 8688868, 10688886, 18088880
Offset: 5

Author

Graham Holmes, Dec 13 2020

Keywords

Comments

a(n) is undefined for n<5, as there are no numbers with 1 segment, 1 with 2 segments, 1 with 3 segments, and 2 with 4 segments. If 0 is excluded as a valid input - so the series would refer to "the n-th positive number" - then a(6) would be 111 rather than 77.

Examples

			For n=7, 47 is the 7th positive number to light 7 segments, after 8, 12, 13, 15, 21, and 31.
		

Crossrefs

Cf. A006942 (segments lit), A216261, A331529.

Programs

  • JavaScript
    s=[6,2,5,5,4,5,6,3,7,6];p=[];a=[];for(i=2;i<=100;i++)p[i]=0;for(i=1;i<=1000000;i++){d=i;n=0;do{x=d%10;n+=s[x];d=(d-x)/10;}while(d>0)p[n]++;if(p[n]==n)a[n]=i;}for(c=2;c<=40;c++)document.write(c+": "+a[c]+"
    ");

A336733 Positive integers which can be written in two bases smaller than 10 as mutually-reversed strings of digit(s).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 11, 17, 22, 31, 51, 87, 91, 102, 121, 212, 220, 248, 2601, 5258, 7491, 8283, 9831, 10516, 13541, 15774, 16566, 71500, 644765, 731445, 811518, 3552340, 314767045, 1427310725, 1848187230, 1916060910, 47124212513, 455075911977
Offset: 1

Author

Graham Holmes, Aug 02 2020

Keywords

Comments

Base conversion yields a string of digits which by convention has any leading zeros suppressed. However, a conversion which yields a low zero (e.g., 96_10 = 240_6) will see that zero preserved when the string of digits is reversed (e.g., into "042"), so it can never match any base-converted strings before reversal. It's therefore not possible to have a solution involving a base which exhibits a low zero for any input x. A consequence of this is that any solution will require both base-converted strings to be of the same length; considering that any solution for a sufficiently-high x will involve only bases 8 and 9 (these having the slowest rate of change with respect to x), we can deduce that the upper limit for valid solutions occurs at the point beyond which length(x base 8) - length(x base 9) is permanently greater than unity, and this can be shown to occur at 8^18, or approximately 1.80*10^16.
40 terms are known up to 4.7*10^13.
It's worthy of note that 22 has two distinct nontrivial solutions as 22_10 = 211_3 = 112_4, and 22_10 = 42_5 = 24_9.
As 1 through 6 have one digit in at least two distinct bases each less than 10 they are trivially included in the sequence. - David A. Corneth, Aug 03 2020
No more terms beyond a(40). - Bert Dobbelaere, Sep 26 2020

Examples

			7 is a term since 7 = 21 (base 3) = 12 (base 5).
9 is a term since 9 = 21 (base 4) = 12 (base 7).
...
1916060910 is a term since it is = 65324151261 (base 7) = 16215142356 (base 8).
		

Crossrefs

Cf. A336768 (for bases >= 4).

Programs

  • JavaScript
    n=[]; rev=[]; incl=[]; for (i=1; i<=1000; i++) { for (j=2; j<=9; j++) { n[j]=i.toString(j); rev[j]=n[j].split("").reverse().join(""); } for (j=2; j<=8; j++) for (k=j+1; k<=9; k++) if (n[j]==rev[k]) if (incl.indexOf(i)==-1) incl.push(i); } document.write(incl);
    
  • Mathematica
    seqQ[n_] := Module[{dig = IntegerDigits[n, Range[2, 9]]}, dig = Select[dig, ! PalindromeQ[#] &]; n < 7 || Intersection[dig, Reverse /@ dig] != {}]; Select[Range[10^6], seqQ] (* Amiram Eldar, Aug 04 2020 *)
  • PARI
    isok(m) = {for (b=2, 8, my(db = digits(m, b)); for(c=b+1, 9, my(dc = digits(m, c)); if (Vecrev(dc) == db, return (1));););} \\ Michel Marcus, Aug 03 2020
    
  • PARI
    is(n) = {my(v = vecsort(vector(8, i, d = digits(n, i+1); if(d[1] < d[#d], Vecrev(d), d)))); for(i = 1, 7, if(v[i] == v[i+1], return(1))); 0} \\ David A. Corneth, Aug 03 2020

Extensions

a(40) from David A. Corneth, Aug 07 2020