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.

Previous Showing 31-40 of 69 results. Next

A091784 Numbers n with digits in nondecreasing order such that sum of the reciprocal of digits is an integer.

Original entry on oeis.org

1, 11, 22, 111, 122, 236, 244, 333, 1111, 1122, 1236, 1244, 1333, 2222, 2488, 2666, 3366, 3446, 4444, 11111, 11122, 11236, 11244, 11333, 12222, 12488, 12666, 13366, 13446, 14444, 22236, 22244, 22333, 26999, 28888, 33999, 34688, 36666, 44488, 44666, 55555, 111111, 111122
Offset: 1

Views

Author

Amarnath Murthy, Feb 17 2004

Keywords

Comments

236 is a member and 263, 326, 362, 623, 632 which are digit permutations of 236 are not included (unlike A037268). Subsidiary sequences: (1) Sum of the reciprocals of all n-digit members. (2) Let the terms with reciprocal sum n be arranged in nondecreasing order. (i) The n-th term in the above sequence (2). (ii) The number of digits in this term of (i).
Subsequence of A009994. - David A. Corneth, Sep 05 2016

Examples

			236 is a member as 1/2 + 1/3 +1/6 = 1.
		

Crossrefs

Programs

  • Mathematica
    Do[l = IntegerDigits[n]; If[Intersection[l, {0}] == {} && IntegerQ[Plus @@ Map[(1/#)&, l]] && Sort[l] == l, Print[n]], {n, 1, 10^5}] (* Ryan Propper, Aug 27 2005 *)
    Select[Range[50000],Min[Differences[IntegerDigits[#]]]>=0&&IntegerQ[ Total[ 1/IntegerDigits[#]]]&] (* Harvey P. Dale, Aug 22 2016 *)
  • PARI
    is(n)=my(d=digits(n), v=vecsort(d),s); if(d==v, s=sum(i=1,#d,1/d[i]); s==s\1, 0) \\ David A. Corneth, Sep 06 2016
    
  • PARI
    getNDigitTerms(n)=my(v=List(),t); forvec(x=vector(8,i,[0,n]), my(u=vector(n,i,1),X=concat(x,n)); for(i=2,9, for(j=X[i-1]+1, X[i],u[j]=i)); if(denominator(sum(i=1,#u,1/u[i]))==1, listput(v,fromdigits(u))),1); Set(v) \\ Charles R Greathouse IV, Sep 06 2016

Extensions

More terms from Ryan Propper, Aug 27 2005
Name corrected by David A. Corneth, Sep 05 2016

A097228 Numbers n such that the product of digits of n equals the concatenation of pi(d)'s where d runs through the digits of n.

Original entry on oeis.org

27, 38, 127, 138, 289, 298, 1127, 1138, 1289, 1298, 11127, 11138, 11289, 11298, 111127, 111138, 111289, 111298, 1111127, 1111138, 1111289, 1111298, 11111127, 11111138, 11111289, 11111298, 111111127, 111111138, 111111289, 111111298
Offset: 1

Views

Author

Farideh Firoozbakht, Aug 15 2004

Keywords

Comments

This sequence is infinite because if n is in the sequence then the number with an arbitrary number of 1's in front of n is also in the sequence. Are 27, 38, 289 and 298 the only nontrivial terms (i.e., terms whose first digit is not 1) in this sequence? The next term is greater than 3*10^8.
There are no more nontrivial terms; i.e., all terms in the sequence are 27, 38, 289, 298 prepended with zero or more 1's. To see this, note that a nontrivial term must have at most 21 digits since 9^22 < 10^21, i.e., has 21 digits. Searching through all numbers in A009994 of at most 21 digits that do not start with 1 shows that there are no more nontrivial terms. - Chai Wah Wu, Aug 10 2017

Examples

			298 is in the sequence because 2*9*8 = 144 = concatenate(pi(2), pi(9), pi(8)) = concatenate(1, 4, 4).
		

Crossrefs

Cf. A097227.

Programs

  • Mathematica
    h[a_]:=(v1={};Do[l=Length[a];v1=Join[v1, IntegerDigits[a[[n]]]], {n, l}]; FromDigits[v1]);v={};Do[h1=IntegerDigits[n];l=Length[h1]; p=Product[h1[[k]], {k, l}];s=Sum[h1[[k]], {k, l}];If[p>0&& p==h[PrimePi[h1]], v=Append[v, n];Print[v]], {n, 300000000}]
    LinearRecurrence[{0,0,0,11,0,0,0,-10},{27,38,127,138,289,298,1127,1138,1289,1298},30] (* Harvey P. Dale, Jan 01 2019 *)
  • Python
    from _future_ import division
    A097228_list = [27,38] + [1000*(10**k-1)//9+d for k in range(20) for d in [127,138,289,298]] # Chai Wah Wu, Aug 10 2017

Formula

From Chai Wah Wu, Aug 10 2017: (Start)
a(n) = 11*a(n-4) - 10*a(n-8) for n > 10.
G.f.: x*(-1600*x^9 - 1620*x^8 - 380*x^7 - 270*x^6 - 120*x^5 - 8*x^4 + 138*x^3 + 127*x^2 + 38*x + 27)/(10*x^8 - 11*x^4 + 1). (End)

A172424 Numbers k > 9 with digits different from 0 and 1 such that both the sum of digits and the product of digits divide k.

Original entry on oeis.org

24, 36, 224, 432, 624, 735, 2232, 3276, 4224, 6624, 23328, 32832, 33264, 34272, 34992, 42336, 42624, 43632, 73332, 82944, 83232, 92232, 93744, 229392, 234432, 244224, 248832, 272832, 282624, 344736, 442368, 622272, 628224, 772632, 843264, 929232, 964224, 973728
Offset: 1

Views

Author

Michel Lagneau, Feb 02 2010

Keywords

Comments

From David A. Corneth, Aug 14 2025: (Start):
When searching terms it is convenient to look for terms t via their smallest number having the same digits (with same multiplicities) as t.
For example the term 432 can be found by permution digits of 234.
It enables to skip a lot of candidates via the following properties:
- If the product of digits of m is a multiple of 3 but the sum of digits of m is not a multiple of 3 then m is not a term.
- If the product of digits of m is a multiple of 9 but the sum of digits of m is not a multiple of 9 then m is not a term.
- The product of digits of a term m cannot be a multiple of 10.
- If the sum of digits of number m is a multiple of 2 but the product of digits of m is not then m cannot be a term.
- If the sum of digits of number m is a multiple of 5 but the product of digits of m is not then m cannot be a term.
It then also helps to reduce the number of permutations to check by looking for possible last digits.
For example when looking for terms with the same digits as 2333466778 we could find there are 151200 permutations. However we must have that such number is divisible by the product of digits i.e. by 3048192 and also by the sum of digits i.e. by 49.
The lcm of 3048192 and 49 is 3048192 so such term must be divisible by 3048192. That number has 8 factors 2.
It turns out there are only 319 possibilities for last 8 digits such that that number is divisible by 2^8 = 256.
One such possibility is ending in 36786432 and so {3, 7} come before that in some permutation.
That leaves at most 2*319 numbers to check instead of 151200. (End)

Examples

			24 is a term since 4+2 = 6 and 2*4 = 8 divides 24.
36 is a term since 3+6 = 9 and 3*6 = 18 divides 36.
224 is a term since 2+2+4 = 8 and 2*2*4 = 32 divides 224.
23328 is a term since 2+3+3+2+8 = 18 and 2*3*3*2*8 = 288 divides 23328.
		

References

  • Charles Ashbacher, Journal of Recreational Mathematics, Vol. 33 (2005), pp. 227.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 166, p. 53, Ellipses, Paris 2008.
  • J.-M. De Koning & A. Mercier, Introduction à la théorie des nombres, Modulo, 2e édition, 1997
  • J.-M. De Koning & A. Mercier, 1001 problèmes en théorie classique des nombres, Ellipses, Paris,2004

Crossrefs

Programs

  • PARI
    \\ See Corneth link
  • Python
    from math import prod
    def ok(n): return n > 9 and {0,1}&set(d:=list(map(int, str(n)))) == set() and n%sum(d) == 0 and n%prod(d) == 0
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Aug 13 2025
    

Extensions

Name edited and more terms from Michael S. Branicky, Aug 13 2025

A190221 Numbers all of whose divisors are numbers whose decimal digits are in nondecreasing order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 33, 34, 35, 36, 37, 38, 39, 44, 45, 46, 47, 48, 49, 55, 56, 57, 58, 59, 66, 67, 68, 69, 77, 78, 79, 88, 89, 99, 111, 112, 113, 114, 115, 116, 117, 118, 119, 125
Offset: 1

Views

Author

Jaroslav Krizek, May 06 2011

Keywords

Comments

Subset of A009994. Superset of A028864, A190218 and A190217.

Examples

			Number 112 is in sequence because all divisors of 112 (1, 2, 4, 7, 8, 14, 16, 28, 56, 112) are numbers whose decimal digits are in nondecreasing order.
		

Programs

  • Maple
    with(numtheory): A190221 := proc(n) option remember: local d, dd, i, j, k, m, poten: if(n=1)then return 1: fi: for k from procname(n-1)+1 do d:=divisors(k): poten:=1: for i from 1 to nops(d) do m:=10: dd:=convert(d[i], base, 10): for j from 1 to nops(dd) do if(m>=dd[j])then m:=dd[j]: else poten:=0: break: fi: od: if(poten=0)then break:fi: od: if(poten=1)then return k: fi: od: end: seq(A190221(n), n=1..64); # Nathaniel Johnston, May 06 2011
  • Mathematica
    ndoQ[n_]:=Min[Differences[IntegerDigits[n]]]>=0; Select[Range[ 200],AllTrue[ Divisors[#],ndoQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 02 2021 *)

A234021 Numbers with digits in nondecreasing order such that sum of squares of digits is a prime.

Original entry on oeis.org

11, 12, 14, 16, 23, 25, 27, 38, 45, 49, 56, 58, 78, 111, 113, 119, 126, 133, 137, 146, 159, 166, 168, 179, 199, 223, 229, 234, 249, 267, 289, 335, 337, 344, 346, 348, 355, 357, 368, 377, 379, 388, 449, 467, 559, 566, 678, 689, 779, 799, 1112, 1114, 1118, 1125
Offset: 1

Views

Author

Zak Seidov, Dec 31 2013

Keywords

Comments

Primitive solutions of A108662. Intersection of A009994 and A108662.

Crossrefs

Programs

  • Mathematica
    Select[Range[1125],LessEqual@@(id=IntegerDigits[#])&&PrimeQ[Total[id^2]]&] (* Ray Chandler, Dec 31 2013 *)

A234841 Integers n such that digits in n and n^2 are in nondecreasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 15, 16, 17, 34, 35, 37, 38, 67, 116, 117, 167, 334, 335, 337, 367, 667, 1667, 3334, 3335, 3337, 3367, 3667, 6667, 16667, 33334, 33335, 33337, 33367, 33667, 36667, 66667, 166667, 333334, 333335, 333337, 333367, 333667, 336667
Offset: 1

Views

Author

Zak Seidov, Dec 31 2013

Keywords

Crossrefs

Intersection of A009994 and A028819.

Programs

  • Mathematica
    Select[Range[0,500000],LessEqual@@IntegerDigits[#]&&LessEqual@@IntegerDigits[#^2]&](* Ray Chandler, Jan 02 2014 *)

A263499 Numbers with nondecreasing digits such that every cyclic shift is a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 37, 79, 113, 199, 337, 3779, 1111111111111111111, 11111111111111111111111
Offset: 1

Views

Author

Chai Wah Wu, Nov 11 2015

Keywords

Comments

a(16) is too big to display, see the b-file.
a(n) is the intersection of the sequences A068652 and A009994. A258706 is a subsequence. Up until a(16) only the term 3779 is missing from A258706.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{d = IntegerDigits@ n}, And[d == Sort@ d, And @@ Table[PrimeQ@ FromDigits[d = RotateLeft@ d], {Length[d] - 1}]]]; Select[
    Prime@ Range@ 600, fQ] (* Michael De Vlieger, Nov 12 2015, after T. D. Noe at A068652 *)

A273040 Least k >= 2 such that the base-k digits of n are nondecreasing.

Original entry on oeis.org

2, 3, 2, 3, 3, 4, 2, 3, 5, 4, 4, 5, 3, 3, 2, 6, 3, 5, 5, 7, 4, 4, 4, 5, 7, 3, 4, 6, 6, 8, 2, 5, 5, 5, 6, 8, 5, 5, 5, 3, 3, 4, 4, 3, 6, 6, 4, 7, 5, 6, 6, 6, 3, 8, 8, 10, 6, 6, 6, 7, 7, 5, 2, 5, 6, 7, 7, 5, 5, 9, 6, 11, 7, 5, 7, 7, 8, 8, 8, 3, 7, 7, 7, 8, 4
Offset: 1

Views

Author

Robert Israel, May 13 2016

Keywords

Comments

a(n) = 2 iff n is in A000225.
a(n) = 3 iff n is in A023745 but not A000225.
a(n) <= floor(n/2)-1 if n > 9.

Examples

			a(6) = 4 because 6 is 110 in base 2 and 20 in base 3, which do not have nondecreasing digits, but 12 in base 4 has nondecreasing digits.
		

Crossrefs

Programs

  • Maple
    F:= proc(n) local k;
       for k from 2 do if ListTools:-Sorted(convert(n,base,k),`>`) then return k fi od:
    end proc:
    map(f, [$1..1000]);
  • Mathematica
    Table[k = 2; While[Sort@ # != # &@ IntegerDigits[n, k], k++]; k, {n, 1, 120}] (* Michael De Vlieger, May 14 2016 *)
    lk[n_]:=Module[{k=2},While[Min[Differences[IntegerDigits[n,k]]]<0,k++]; k]; Array[lk,90] (* Harvey P. Dale, May 24 2016 *)

A273045 Fibonacci numbers with digits in nondecreasing order.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 13, 34, 55, 89, 144, 233, 377
Offset: 1

Views

Author

Omar E. Pol, May 13 2016

Keywords

Comments

Intersection of A000045 and A009994. - Felix Fröhlich, May 16 2016
Conjecture: The sequence is finite, with 377 being the last term. I have verified the conjecture up to A000045(10^5). - Felix Fröhlich, May 16 2016
Conjecture verified up to Fibonacci(10^8). - Charles R Greathouse IV, May 17 2016

Crossrefs

Programs

  • Mathematica
    Select[Fibonacci@ Range[0, 10^4], Sort@ # == # &@ IntegerDigits@ # &] (* Michael De Vlieger, May 13 2016 *)
  • PARI
    is_a009994(n) = digits(n)==vecsort(digits(n))
    for(n=0, 1e4, if(is_a009994(fibonacci(n)), print1(fibonacci(n), ", "))) \\ Felix Fröhlich, May 16 2016
    
  • PARI
    fibmod(n,m)=lift(((Mod([1,1;1,0],m))^n)[1,2])
    isA009994(n)=my(d=digits(n)); vecsort(d)==d
    B1=10^9;B2=10^57;
    for(n=1,1e9, if(isA009994(fibmod(n,B1)) && isA009994(fibmod(n,B2)) && isA009994(F=fibonacci(n)), print1(F", "))) \\ Charles R Greathouse IV, May 17 2016

Extensions

Offset adjusted by Felix Fröhlich, May 16 2016

A274125 Numbers having digits in nondecreasing order and sum of digits greater than or equal to the product of digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 111, 112, 113, 114, 115, 116, 117, 118, 119, 122, 123, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1122, 1123, 1124, 11111, 11112, 11113, 11114, 11115, 11116, 11117, 11118, 11119, 11122
Offset: 1

Views

Author

David A. Corneth, Jun 10 2016

Keywords

Comments

Intersection of A062996 and A009994. Permuting the digits of the terms of this sequence gives A254621. Permutations of digits can be found in A261370. The union of A254621 and A011540 is A062996.

Crossrefs

Programs

  • Mathematica
    upto[nd_] := Sort[FromDigits /@ Reverse /@ Select[ Flatten[ IntegerPartitions[#, nd, Range@ 9] & /@ Range[9 nd], 1], Times @@ # <= Plus @@ # &]]; upto[8] (* Giovanni Resta, Jun 20 2016 *)
  • PARI
    is(n) = my(d=digits(n)); prod(i=1, #d, d[i]) <= vecsum(d) && vecsort(d) == d
Previous Showing 31-40 of 69 results. Next