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 23 results. Next

A355078 a(n) is the smallest number k with exactly n divisors in A033075.

Original entry on oeis.org

1, 2, 4, 6, 18, 12, 24, 60, 120, 168, 360, 1080, 840, 3360, 2520, 7560, 15120, 30240, 84840, 196560, 339360, 254520, 1102920, 763560, 1527120, 4581360, 3054240, 9162720, 9926280, 19852560, 59557680, 39705120, 119115360, 277935840, 674987040, 1151448480, 1469089440
Offset: 1

Views

Author

Marius A. Burtea, Jul 11 2022

Keywords

Examples

			1 has a single divisor in A033075, so a(1) = 1.
2 has divisors 1 and 2 in A033075, so a(2) = 2;
3 has only divisors 1, 3 in A033075, 4 has divisors 1, 2, 4 in A033075, so a(3) = 4.
5 has only divisors 1, 5 in A033075, 6 has divisors 1, 2, 3, 6 in A033075, so a(4) = 6.
		

Crossrefs

Cf. A033075.

Programs

  • Magma
    alt:=func; a:=[]; for n in [1..37] do k:=1; while #[d:d in Divisors(k)|alt(d)] ne n do k:=k+1; end while; Append(~a,k); end for; a;
    
  • PARI
    diff(v)=vector(#v-1, i, v[i+1]-v[i]);
    is(n)=if(n>9, Set(abs(diff(digits(n))))==[1], n>0);
    a(n) = my(k=1); while (sumdiv(k, d, is(d)) != n, k++); k; \\ Michel Marcus, Jul 11 2022

A048398 Primes with consecutive digits that differ exactly by 1.

Original entry on oeis.org

2, 3, 5, 7, 23, 43, 67, 89, 101, 787, 4567, 12101, 12323, 12343, 32321, 32323, 34543, 54323, 56543, 56767, 76543, 78787, 78989, 210101, 212123, 234323, 234343, 432121, 432323, 432343, 434323, 454543, 456767, 654323, 654343, 678767, 678989
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Comments

Or, primes in A033075. - Zak Seidov, Feb 01 2011

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 67, p. 23, Ellipses, Paris 2008.

Crossrefs

Cf. A010051; intersection of A033075 and A000040.

Programs

  • Haskell
    a048398 n = a048398_list !! (n-1)
    a048398_list = filter ((== 1) . a010051') a033075_list
    -- Reinhard Zumkeller, Feb 21 2012, Nov 04 2010
    (Python 3.2 or higher)
    from itertools import product, accumulate
    from sympy import isprime
    A048398_list = [2,3,5,7]
    for l in range(1,17):
        for d in [1,3,7,9]:
            dlist = [d]*l
            for elist in product([-1,1],repeat=l):
                flist = [str(d+e) for d,e in zip(dlist,accumulate(elist)) if 0 <= d+e < 10]
                if len(flist) == l and flist[-1] != '0':
                    n = 10*int(''.join(flist[::-1]))+d
                    if isprime(n):
                        A048398_list.append(n)
    A048398_list = sorted(A048398_list) # Chai Wah Wu, May 31 2017
  • Mathematica
    Select[Prime[Range[10000]], # < 10 || Union[Abs[Differences[IntegerDigits[#]]]] == {1} &]

A215014 Numbers where any two consecutive decimal digits differ by 1 after arranging the digits in decreasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 102, 120, 123, 132, 201, 210, 213, 231, 234, 243, 312, 321, 324, 342, 345, 354, 423, 432, 435, 453, 456, 465, 534, 543, 546, 564, 567, 576, 645, 654, 657, 675, 678, 687, 756, 765, 768, 786, 789, 798, 867
Offset: 1

Views

Author

Keywords

Comments

a(4091131) = 9876543210 is the last term.
Numbers n such that A004186(n) is a term of A033075. - Felix Fröhlich, Dec 26 2017
Also 0 together with positive integers having k distinct digits and the difference between the largest and the smallest digit equal to k-1. - David A. Corneth, Dec 26 2017

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[If[Times @@ Differences@Sort@IntegerDigits[n] == 1, AppendTo[lst, n]], {n, 0, 675}]; lst (* Arkadiusz Wesolowski, Aug 01 2012 *)
    Join[Range[0,9],Select[Range[1000],Union[Differences[Sort[ IntegerDigits[ #]]]] == {1}&]] (* Harvey P. Dale, Jan 14 2015 *)
  • PARI
    is(n)=my(v=vecsort(eval(Vec(Str(n)))));for(i=2,#v,if(v[i]!=1+v[i-1],return(0)));1
    
  • PARI
    is(n) = if(!n, return(1)); my(d = digits(n), v = vecsort(d,,8)); #d == #v && v[#v] - v[1] == #v - 1
    
  • Python
    # Ely Golden, Dec 26 2017
    def consecutive(li):
      for i in range(len(li)-1):
        if(li[i+1]!=1+li[i]): return False
      return True
    def sorted_digits(n):
      lst=[]
      while(n>0):
        lst+=[n%10] ; n//=10
      lst.sort() ; return lst
    j=0
    for i in range(1,10001):
      while(not consecutive(sorted_digits(j))): j+=1
      print(str(i)+" "+str(j)) ; j+=1
    
  • Python
    # alternate for generating full sequence in seconds
    from itertools import permutations as perms
    frags = ["0123456789"[i:j] for i in range(10) for j in range(i+1, 11)]
    afull = sorted(set(int("".join(s)) for f in frags for s in perms(f)))
    print(afull[:70]) # Michael S. Branicky, Aug 04 2022

Formula

If zero is excluded, the number of terms with k digits, 1 <= k <= 10, is (11-k)*k! - (k-1)!. - Franklin T. Adams-Watters, Aug 01 2012

Extensions

Name edited by Felix Fröhlich, Dec 26 2017

A090994 Number of meaningful differential operations of the n-th order on the space R^9.

Original entry on oeis.org

9, 17, 32, 61, 116, 222, 424, 813, 1556, 2986, 5721, 10982, 21053, 40416, 77505, 148785, 285380, 547810, 1050876, 2017126, 3869845, 7427671, 14250855, 27351502, 52479500, 100719775, 193258375, 370895324, 711682501, 1365808847, 2620797529
Offset: 1

Views

Author

Branko Malesevic, Feb 29 2004

Keywords

Comments

Also number of meaningful compositions of the n-th order of the differential operations and Gateaux directional derivative on the space R^8. - Branko Malesevic and Ivana Jovovic (ivana121(AT)EUnet.yu), Jun 21 2007
Also (starting 5,9,...) the number of zig-zag paths from top to bottom of a rectangle of width 10, whose color is that of the top right corner. [From Joseph Myers, Dec 23 2008]
Also, number of n-digit terms in A033075 (stated without proof in A033075). - Zak Seidov, Feb 02 2011

Crossrefs

Programs

  • GAP
    a:=[9,17,32,61,116];; for n in [6..40] do a[n]:=a[n-1]+4*a[n-2] - 3*a[n-3]-3*a[n-4]+a[n-5]; od; a; # G. C. Greubel, Feb 02 2019
  • Magma
    m:=40; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(  x*(9+8*x-21*x^2-12*x^3+5*x^4)/(1-x-4*x^2+3*x^3+3*x^4-x^5) )); // G. C. Greubel, Feb 02 2019
    
  • Maple
    NUM := proc(k :: integer) local i,j,n,Fun,Identity,v,A; n := 9; # <- DIMENSION Fun := (i,j)->piecewise(((j=i+1) or (i+j=n+1)),1,0); Identity := (i,j)->piecewise(i=j,1,0); v := matrix(1,n,1); A := piecewise(k>1,(matrix(n,n,Fun))^(k-1),k=1,matrix(n,n,Identity)); return(evalm(v&*A&*transpose(v))[1,1]); end:
  • Mathematica
    LinearRecurrence[{1, 4, -3, -3, 1}, {9, 17, 32, 61, 116}, 31] (* Jean-François Alcover, Nov 20 2017 *)
  • PARI
    my(x='x+O('x^40)); Vec(x*(9+8*x-21*x^2-12*x^3+5*x^4)/(1-x-4*x^2 +3*x^3+3*x^4-x^5)) \\ G. C. Greubel, Feb 02 2019
    
  • Sage
    a=(x*(9+8*x-21*x^2-12*x^3+5*x^4)/(1-x-4*x^2+3*x^3+3*x^4-x^5)).series(x, 40).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 02 2019
    

Formula

a(k+5) = a(k+4) + 4*a(k+3) - 3*a(k+2) - 3*a(k+1) + a(k).
G.f.: x*(9+8*x-21*x^2-12*x^3+5*x^4)/(1-x-4*x^2+3*x^3+3*x^4-x^5). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009; corrected by R. J. Mathar, Sep 16 2009

Extensions

More terms from Joseph Myers, Dec 23 2008

A228326 Start with 0. Successive digits in the sequence must differ by 1. Adjoin the smallest number not yet in the sequence.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 87, 65, 43, 21, 23, 45, 67, 89, 876, 54, 32, 10, 12, 34, 56, 76, 78, 98, 765, 432, 101, 210, 121, 212, 123, 232, 321, 234, 323, 434, 343, 454, 345, 456, 543, 2101, 2121, 2123, 2321, 2323, 2343, 2345, 654, 545, 656, 565, 676, 567
Offset: 1

Views

Author

N. J. A. Sloane, Aug 24 2013

Keywords

Comments

Is the sequence infinite?
Yes, as for any digit d, there are infinitely many terms in A033075 with leading digit d+1 or d-1. - Paul Tek Aug 25 2013

References

  • Eric Angelini, Posting to the Sequence Fans Mailing List, Aug 23 2013.

Crossrefs

A134336 Nonnegative integers n containing each digit between n's smallest and largest decimal digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 22, 23, 32, 33, 34, 43, 44, 45, 54, 55, 56, 65, 66, 67, 76, 77, 78, 87, 88, 89, 98, 99, 100, 101, 102, 110, 111, 112, 120, 121, 122, 123, 132, 201, 210, 211, 212, 213, 221, 222, 223, 231, 232, 233, 234, 243, 312, 321, 322, 323
Offset: 1

Views

Author

Rick L. Shepherd, Oct 21 2007

Keywords

Comments

A032981 is a subsequence; the term 102 is the first positive integer not also in A032981. A171102 (pandigital numbers) and A033075 are subsequences. Union of A010785 (repdigits) and A108965.
a(n) = A178403(n) for n < 48. - Reinhard Zumkeller, May 27 2010
Equivalently, numbers with the property that the set of its decimal digits is a set of consecutive numbers. - Tanya Khovanova and Charles R Greathouse IV, Jul 31 2012

Crossrefs

Cf. A032981, A050278, A033075 (a subsequence), A010785, A108965.

Programs

  • PARI
    is(n)=my(v=vecsort(eval(Vec(Str(n))),,8));for(i=2,#v,if(v[i]!=1+v[i-1],return(0)));1 \\ Tanya Khovanova and Charles R Greathouse IV, Jul 31 2012
    
  • PARI
    is_A134336(n)={vecmax(n=Set(digits(n)))-vecmin(n)==#n-1} \\ M. F. Hasler, Dec 24 2014
    
  • Python
    def ok(n): d = sorted(set(map(int, str(n)))); return d[-1]-d[0]+1 == len(d)
    print([k for k in range(324) if ok(k)]) # Michael S. Branicky, Dec 12 2023

Formula

a(n) ~ n. - Charles R Greathouse IV, Sep 09 2011

Extensions

Edited by N. J. A. Sloane, Aug 06 2012

A048410 Numbers whose consecutive digits differ by 8.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 80, 91, 191, 808, 919, 1919, 8080, 9191, 19191, 80808, 91919, 191919, 808080, 919191, 1919191, 8080808, 9191919, 19191919, 80808080, 91919191, 191919191, 808080808, 919191919, 1919191919, 8080808080
Offset: 0

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    With[{nn=10},Join[Range[0,9],Table[FromDigits[PadRight[{},n,{1,9}]],{n,nn}], Table[FromDigits[PadRight[{},m,{9,1}]],{m,nn}],Table[ FromDigits[ PadRight[ {},k,{8,0}]],{k,nn}]]]//Union (* Harvey P. Dale, Jul 17 2017 *)

A048407 Numbers whose consecutive digits differ by 5.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 27, 38, 49, 50, 61, 72, 83, 94, 161, 272, 383, 494, 505, 616, 727, 838, 949, 1616, 2727, 3838, 4949, 5050, 6161, 7272, 8383, 9494, 16161, 27272, 38383, 49494, 50505, 61616, 72727, 83838, 94949, 161616, 272727, 383838
Offset: 0

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Join[Range[0,9],Select[Range[400000],Union[Abs[Differences[ IntegerDigits[ #]]]] == {5}&]] (* Harvey P. Dale, Sep 23 2013 *)

A048406 Numbers whose consecutive digits differ by 4.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 26, 37, 40, 48, 51, 59, 62, 73, 84, 95, 151, 159, 262, 373, 404, 484, 515, 595, 626, 737, 840, 848, 951, 959, 1515, 1595, 2626, 3737, 4040, 4048, 4840, 4848, 5151, 5159, 5951, 5959, 6262, 7373, 8404, 8484, 9515, 9595, 15151
Offset: 0

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Crossrefs

A048411 Squares whose consecutive digits differ by 1.

Original entry on oeis.org

0, 1, 4, 9, 121, 676, 12321, 1234321, 123454321, 12345654321, 1234567654321, 123456787654321, 12345678987654321
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1999

Keywords

Comments

a(14), if it exists, is > 10^34. - Lars Blomberg, Nov 25 2016
Is it true that all terms are palindromes? - Chai Wah Wu, Apr 06 2018
a(14), if it exists, is > 10^52. - Michael S. Branicky, Apr 22 2025

Crossrefs

Cf. A010052; intersection of A033075 and A000290.

Programs

  • Haskell
    a048411 n = a048411_list !! (n-1)
    a048411_list = filter ((== 1) . a010052) a033075_list
    -- Reinhard Zumkeller, Feb 21 2012
    
  • Mathematica
    Select[Range[0, 10^7]^2, Or[# == 0, IntegerLength@ # == 1, Union@ Abs@ Differences@ IntegerDigits@ # == {1}] &] (* Michael De Vlieger, Nov 25 2016 *)
  • Python
    from sympy.ntheory.primetest import is_square
    def gen(d, s=None):
        if d == 0: yield tuple(); return
        if s == None:
            yield from [(i, ) + g for i in range(1, 10) for g in gen(d-1, s=i)]
        else:
            if s > 0: yield from [(s-1, ) + g for g in gen(d-1, s=s-1)]
            if s < 9: yield from [(s+1, ) + g for g in gen(d-1, s=s+1)]
    def afind(maxdigits):
        print(0, end=", ")
        for d in range(1, maxdigits+1):
            for g in gen(d, s=None):
                t = int("".join(map(str, g)))
                if is_square(t): print(t, end=", ")
    afind(17) # Michael S. Branicky, Sep 26 2021

Formula

a(n) = A048412(n)^2.
Showing 1-10 of 23 results. Next