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 61-69 of 69 results.

A362678 Primes whose digits are prime and in nondecreasing order.

Original entry on oeis.org

2, 3, 5, 7, 23, 37, 223, 227, 233, 257, 277, 337, 557, 577, 2237, 2333, 2357, 2377, 2557, 2777, 3557, 5557, 22277, 22777, 23333, 23357, 23557, 25577, 33377, 33577, 222337, 222557, 223337, 223577, 233357, 233557, 233777, 235577, 333337, 335557, 355777
Offset: 1

Views

Author

James C. McMahon, Jul 03 2023

Keywords

Comments

Intersection of A009994 and A019546.
The subsequence for primes whose digits are prime and in strictly increasing order has just eight terms: 2 3 5 7 23 37 257 2357 (see A177061).

Crossrefs

Programs

  • Maple
    M:= 7: # for terms with <+ M digits
    R:= NULL:
    for d from 1 to M do
      S:= NULL:
      for x2 from 0 to d do
        for x3 from 0 to d-x2 do
          for x5 from 0 to d-x2-x3 do
            x7:= d-x2-x3-x5;
            x:= parse(cat(2$x2,3$x3,5$x5,7$x7));
            if isprime(x) then S:= S,x fi;
        od od od;
        R:= R, op(sort([S]));
    od:
    R;  # Robert Israel, Jul 04 2023
  • Mathematica
    Select[Prime[Range[31000]], AllTrue[d = IntegerDigits[#], PrimeQ] && LessEqual @@ d &] (* Amiram Eldar, Jul 07 2023 *)
  • PARI
    isok(p) = if (isprime(p), my(d=digits(p)); (d == vecsort(d)) && (#select(isprime, d) == #d)); \\ Michel Marcus, Jul 07 2023
  • Python
    from sympy import isprime
    from itertools import count, combinations_with_replacement as cwr, islice
    def agen(): yield from (filter(isprime, (int("".join(c)) for d in count(1) for c in cwr("2357",d))))
    print(list(islice(agen(), 50))) # Michael S. Branicky, Jul 05 2023
    

A031996 Duplicate of A023753.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 39, 40, 41, 42, 43, 44, 45, 46, 47, 52, 53, 54, 55, 56, 57, 58, 59, 65, 66, 67, 68, 69, 70, 71, 78, 79, 80, 81, 82, 83, 91
Offset: 1

Views

Author

Keywords

Crossrefs

A190588 Losing positions in Nim (misere) with up to 9 stones on each heap.

Original entry on oeis.org

1, 22, 33, 44, 55, 66, 77, 88, 99, 111, 123, 145, 167, 189, 246, 257, 347, 356, 1122, 1133, 1144, 1155, 1166, 1177, 1188, 1199, 1247, 1256, 1346, 1357, 2222, 2233, 2244, 2255, 2266, 2277, 2288, 2299, 2345, 2367, 2389, 3333, 3344, 3355, 3366, 3377, 3388, 3399, 4444, 4455, 4466, 4477, 4488, 4499, 4567, 4589, 5555, 5566, 5577, 5588, 5599, 6666, 6677, 6688, 6699, 6789, 7777, 7788, 7799, 8888, 8899, 9999, 11111
Offset: 1

Views

Author

Sergio Pimentel, May 13 2011

Keywords

Comments

In the game of Nim (misere) the player who takes the last stone loses. This sequence is a subsequence of A009994 (numbers with digits in nondecreasing order).

Examples

			Example: a(2) is 22 because it represents a losing position with two heaps with two stones in each. In the game of Nim (misere) the player who takes the last stone loses. If Player A takes one stone from heap 1, then Player B takes two from heap 2, leaving Player A to pick the last stone and lose the game.
		

Crossrefs

A249443 Numbers with digits in nondecreasing order and digital sum not larger than the product of the digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 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, 123, 124, 125, 126, 127, 128, 129, 133, 134, 135, 136, 137, 138, 139, 144, 145, 146, 147, 148, 149, 155, 156, 157, 158
Offset: 1

Views

Author

M. F. Hasler, Oct 29 2014

Keywords

Comments

Intersection of A009994 and A062998.
Except for the initial 0, a subsequence of the zeroless numbers A052382.
The nonzero terms of this sequence correspond to a term of A061672 obtained by concatenation with A002275(A007954(a(n))-A007953(a(n))).

Crossrefs

Programs

  • PARI
    is(n)={vecsort(n=digits(n))==n && normlp(n,1)<=prod(i=1,#n,n[i])}

A274368 Numbers k such that if k is decreased by the sum of its digits and k is decreased by the product of its digits both differences are squares > 0.

Original entry on oeis.org

45, 48, 231, 121116, 159229, 11985489, 17514256, 51624256, 88172137, 228523729, 467597425, 11112111412, 4329279198937, 3716589421762641, 23228676113127556, 138417183479417732388
Offset: 1

Views

Author

Pieter Post, Jun 19 2016

Keywords

Comments

It appears that if k is increased by the sum of its digits and k is increased by the product of its digits no two squares are found, except for the trivial k = 2 and k = 8.
The smallest k>8 such that k+A007953(k) and k+A007954(k) are both squares is k = 6469753431969. If a fourth such k exists, it must be larger than 1.6*10^19. - Giovanni Resta, Jun 19 2016

Examples

			45 - (4 + 5) = 36 and 45 - (4 * 5) = 25.
159229 - (1 + 5 + 9 + 2 + 2 + 9) = 157609 (= 397^2) and 159229 - (1*5*9*2*2*9) = 159201 (= 399^2).
From _David A. Corneth_, May 27 2021: (Start)
If the digits of a(n) = x are an anagram of 122599 then the product of digits is 1 * 2 * 2 * 5 * 9 * 9 = 1620 and the sum of digits is 1 + 2 + 2 + 5 + 9 + 9 = 28 as order of addition and multiplication does not matter. So x - 31 = m^2 and x - 1620 = k^2 for some positive integers k and m.
So m^2 - k^2 = (x - 28) - (x - 1620) = 1592 = (m - k)*(m + k). The divisors of 1592 are 1, 2, 4, 8, 199, 398, 796, 1592. Testing possible pairs m-k and m+k gives, among other pairs, (m - k, m + k) = (2, 796). Solving for k gives k = 397 so x = k^2 + 1620 = 397^2 + 1620 = 159229 giving an extra term. (End)
		

Crossrefs

Intersection of A066566 and A228187.

Programs

  • Mathematica
    lim = 10^6; s = Select[Range@ lim, IntegerQ@ # && # != 0 &@ Sqrt[# - Times @@ IntegerDigits@ #] &]; t = Select[Range@ lim, IntegerQ@ # && # != 0 &@ Sqrt[# - Total@ IntegerDigits@ #] &]; Intersection[s, t] (* Michael De Vlieger, Jun 19 2016 *)
  • PARI
    a007953(n) = sumdigits(n)
    a007954(n) = my(d=digits(n)); prod(i=1, #d, d[i])
    is(n) = n > 9 && issquare(n-a007953(n)) && issquare(n-a007954(n)) \\ Felix Fröhlich, Jun 19 2016
  • Python
    def pod(n):
        p = 1
        for x in str(n):
            p *= int(x)
        return p
    def sod(n):
        return sum(int(d) for d in str(n))
    def cube(z,p):
        iscube=False
        y=int(pow(z,1/p)+0.01)
        if y**p==z:
            iscube=True
        return iscube
    for c in range(1, 10**8):
        aa,ab=c-pod(c),c-sod(c)
        if cube(aa,2) and cube(ab,2) and aa>0:
           print(c,aa,ab)
    

Extensions

a(10)-a(15) from Giovanni Resta, Jun 19 2016
a(16) from David A. Corneth, May 27 2021

A318273 Numbers with digits in nondecreasing order such that additive and multiplicative digital roots coincide.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 123, 137, 139, 168, 179, 188, 233, 267, 299, 346, 389, 899, 1124, 1157, 1347, 1355, 1469, 1779, 1788, 2236, 2346, 2348, 2778, 3335, 3779, 11126, 11133, 11148, 11177, 11222, 11238, 11279, 11339, 11369, 11579, 11666, 11677, 11679, 11699
Offset: 1

Views

Author

David A. Corneth, Aug 23 2018

Keywords

Comments

A299690 can be used to find terms for this sequence below some bound by prepending ones to terms while staying below that bound so the additive and multiplicative root that term matches.
For example, 27 is in A299690 and has multiplicative root 4. 27 has the additive root 9. Prepending 4 ones gives the number 111127 which has multiplicative root 4, the same as 27 has, but it also has an additive root of 4. Furthermore, the digits are in nondecreasing order hence is in this sequence.

Crossrefs

Programs

  • PARI
    is(n) = my(cn=n); d=digits(n); if(d!=vecsort(d), return(0)); while(cn>9, d=digits(cn); cn=prod(i=1, #d, d[i])); cn-1 == (n-1)%9 || n == 0

A333960 Numbers k with digits in nondecreasing order and each digit > 1 such that the iterated product of digits of k is a prime and k is the least positive integer with this property and its product of digits.

Original entry on oeis.org

2, 3, 5, 7, 26, 35, 37, 57, 355, 278, 279, 359, 299, 557, 389, 579, 999, 2699, 2799, 5579, 5777, 3889, 4788, 3999, 35559, 26999, 29999, 47888, 277777, 357799, 267999, 557779, 288999, 2777778, 689999, 779999, 2688888, 7777888, 26777777, 6788899, 27777899, 47778899, 67788888, 77788888, 2677777889, 7777777788, 26888888889
Offset: 1

Views

Author

David A. Corneth, Apr 11 2020

Keywords

Comments

Primitive sequence to A333955.

Examples

			26 is in the sequence. It has iterated product of digits 2 which is prime and its digits are in nondecreasing order and all digits are > 1 and 26 is the least integer with these properties having product of digits 12.
34 is not in the sequence. It has all properties mentioned above except it has product of digits 12 where 34 isn't the least positive integer with those properties and product of digits 12.
		

Crossrefs

A338257 Positive integers k with digits in nondecreasing order for which the digital sum contains the same distinct digits as the digital product.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 99, 123, 1124, 1137, 3344, 11125, 11133, 11222, 11558, 22334, 111126, 111339, 222233, 1111127, 1111134, 1111278, 1112779, 11111128, 11111223, 11111478, 11111479, 11112455, 111111129, 111111135, 111111447, 111111559, 111111667, 111112278
Offset: 1

Views

Author

David A. Corneth, Oct 18 2020

Keywords

Comments

Intersection of A009994 and A249334.

Examples

			3344 is in the sequence as its digits are in nondecreasing order and the digital sum is 14 and the digital product is 144. The digits of the latter two are either 1 or 4.
		

Crossrefs

Programs

  • PARI
    is(n) = {my(d); if(vecsort(d = digits(n)) != d, return(0)); Set(digits(vecprod(d))) == Set(digits(vecsum(d)))}

A338258 Positive integers with digits in nondecreasing order for which the digital sum contains the same distinct digits as the digital product but the digital sum is not equal to the digital product.

Original entry on oeis.org

99, 1137, 3344, 11558, 22334, 111339, 222233, 1111278, 1112779, 11111478, 11111479, 11112455, 111111447, 111111559, 111111667, 111112278, 111112279, 111113557, 111113677, 111122255, 111135558, 1111111489, 1111112247, 1111113333, 1111116899, 1111145556, 1111555588, 1244455555
Offset: 1

Views

Author

David A. Corneth, Oct 18 2020

Keywords

Comments

Intersection of A009994 and A249335.

Examples

			22334 is in the sequence as its digital product is 144 and its digital sum is 14. The digits of the latter two are either 1 or 4 and the values 14 and 144 differ.
		

Crossrefs

Programs

  • PARI
    is(n) = {my(d); if(vecsort(d = digits(n)) != d, return(0)); vp = vecprod(d); vs = vecsum(d); vp != vs && Set(digits(vp)) == Set(digits(vs))}
Previous Showing 61-69 of 69 results.