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 21-30 of 35 results. Next

A276802 Non-repdigit numbers n such that A045876(n) ends with n.

Original entry on oeis.org

554, 3328, 55553, 77764, 222221, 444442, 666663, 888865, 888884, 5555552, 6666595, 9999840, 33332680, 55555526, 66666557, 99998670, 333332176, 333333312, 555555551, 666665752, 666666624, 999997536, 999999936, 9999976480, 9999997844, 9999999668, 9999999923, 11111111110
Offset: 1

Views

Author

Altug Alkan, Sep 17 2016

Keywords

Examples

			554 is a term because 455+545+554 = 1554 that ends with 554.
2338 is the least term having its digits. For all permutations p of digits of n, in this case 2338, (without leading zeros if any), A045876(n) = A045876(p). A045876(2338) = 53328. It contains the digits of 2338 and ends with its digits permuted. 2338 has 4 digits, as has 53328 mod 10^4 so 53328 mod 10^4 == 3328 is a term. - _David A. Corneth_, Oct 04 2016
		

Crossrefs

Cf. A045876, A139819 (non-repdigits), A179239.

Programs

Extensions

More terms from David A. Corneth, Oct 06 2016

A287478 Positive numbers m with the property that m is the least cyclic permutation of its digits with the same number of digits as m.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48, 49, 50, 55, 56, 57, 58, 59, 60, 66, 67, 68, 69, 70, 77, 78, 79, 80, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120
Offset: 1

Views

Author

David A. Corneth, May 25 2017

Keywords

Comments

First differs from A179239 at n = 83; a(83) = 120 and A179239(83) = 122. This sequence is a supersequence of A179239.
If there is a zero digit, then we do not consider the cyclic shift which begins with the zero digit.
The number 0 should also be in this list. The initial digit of any term must be its smallest nonzero digit. - M. F. Hasler, Oct 18 2019

Crossrefs

Programs

  • Mathematica
    Select[Range@ 120, Function[d, First@ Sort@ Map[FromDigits, DeleteCases[ NestList[RotateLeft, d, Length@ d - 1], ?(First@ # == 0 &)]] == #]@ IntegerDigits@ # &] (* _Michael De Vlieger, May 27 2017 *)
  • PARI
    is(n) = my(d=digits(n), v=vector(#d), no=n, nn=n, l=List(n)); for(i=2,#d, no = nn\10; no = no+(nn-no*10)*10^(#d-1); if(#digits(no)==#d,listput(l, no)); nn=no); listsort(l); n==l[1]
    is(n) = {my(d = digits(n), dd = concat(d, d)); for(i=2,#d, c=vector(#d, j, dd[i+j-1]); if(fromdigits(c) < n, if(c[1]!=0, return(0)))); 1}
    
  • PARI
    is_A287478(n,D=digits(n))={!for(i=2,#D,((D[i]M. F. Hasler, Oct 18 2019

A328293 Composite numbers k such that k+A055012(k) is the cube of a prime.

Original entry on oeis.org

34, 12025, 12130, 22789, 102952, 103039, 205222, 226019, 300176, 492203, 492221, 570760, 1030144, 1224376, 1224466, 2570470, 2684090, 3307264, 3868067, 3868157, 4329380, 4656049, 4656427, 5176537, 6966262, 6966403, 6966421, 7186697, 7186787, 7187318, 7187516, 7644406, 11694973, 12007691, 12008315
Offset: 1

Views

Author

Will Gosnell and Robert Israel, Oct 11 2019

Keywords

Comments

Computing the range of A055012(n) up to some upper limit using A179239 might help reduce the search space for finding terms. - David A. Corneth, Oct 11 2019

Examples

			a(3) = 12130 is included because 12130 is composite and 12130 + 1^3 + 2^3 + 1^3 + 3^3 + 0^3 = 12167 = 23^3 and 23 is prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local x,t,F;
      if isprime(n) then return false fi;
      x:= n + add(t^3, t = convert(n,base,10));
      F:= ifactors(x)[2];
      nops(F)=1 and F[1][2]=3
    end proc:
    F:= proc(p,lastp) local n0;
      n0:= max(p^3 - 9^3*(1+ilog10(p^3)),lastp^3+1);
      select(filter, [$n0 .. p^3]);
    end proc:
    seq(op(F(ithprime(i),ithprime(i-1))),i=2..50);
  • PARI
    (scan(a,b)=forcomposite(n=max(a,b-9^3*(logint(b,10)+1))+1,b, n+A055012(n)==b && printf(n","))); forprime(p=1+o=2,234, scan(o^3,p^3)) \\ M. F. Hasler, Oct 11 2019

A328515 Number of primes in permutations of digits per permutation class of the positive integers ordered by smallest member of this class excluding leading zeros.

Original entry on oeis.org

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

Views

Author

David A. Corneth, Oct 18 2019

Keywords

Comments

Primitive sequence of A039999.

Examples

			A179239(67) = 103. Its permutations of digits without leading zeros are 103, 130, 301, 310. Of these, only 103 is prime which is one number. So a(67) = 1.
		

Crossrefs

A357096 Least number whose set of decimal digits coincides with the set of decimal digits of prime(n).

Original entry on oeis.org

2, 3, 5, 7, 1, 13, 17, 19, 23, 29, 13, 37, 14, 34, 47, 35, 59, 16, 67, 17, 37, 79, 38, 89, 79, 10, 103, 107, 109, 13, 127, 13, 137, 139, 149, 15, 157, 136, 167, 137, 179, 18, 19, 139, 179, 19, 12, 23, 27, 29, 23, 239, 124, 125, 257, 236, 269, 127, 27, 128, 238, 239
Offset: 1

Views

Author

Jean-Marc Rebert, Sep 12 2022

Keywords

Examples

			prime(5) = 11 and 1 have the same set of digits {1}, and 1 is the smallest such number, hence a(5) = 1.
		

Crossrefs

Programs

  • Maple
    f:= proc(p) local L,i;
      L:= sort(convert(convert(convert(p,base,10),set),list));
      if L[1] = 0 then L[1]:= L[2]; L[2]:= 0 fi;
      add(L[-i]*10^(i-1),i=1..nops(L)) end proc:
    seq(f(ithprime(i)),i=1..100); # Robert Israel, Sep 12 2022
  • Mathematica
    a[n_] := Module[{d = Union[IntegerDigits[Prime[n]]]}, If[d[[1]] == 0, d[[1;;2]] = d[[2;;1;;-1]]]; FromDigits[d]]; Array[a, 100] (* Amiram Eldar, Sep 13 2022 *)
  • PARI
    a(n)=my(v=vecsort(digits(prime(n)),,8),w=v);if(v[1]==0,j=#v;w=if(j>2,v[3..j],[]);w=concat(Vecrev(v[1..2]),w));fromdigits(w)
    
  • Python
    from sympy import prime
    def a(n):
        s = "".join(sorted(set(str(prime(n)))))
        return int(s) if "0" not in s else int(s[1] + "0" + s[2:])
    print([a(n) for n in range(1, 63)]) # Michael S. Branicky, Sep 12 2022

A369203 a(n) is the first number that has exactly n anagrams that each have exactly n prime divisors, counted by multiplicity.

Original entry on oeis.org

2, 15, 117, 135, 1224, 10023, 10026, 50688, 104445, 100368, 1012257, 1002258, 1034568, 10027899, 10024569, 100002789, 100234566, 100236789, 1000024569, 1012566789, 10000224468, 10002367899, 10002345678, 100012344588, 100012234689, 100223456778, 1000012457889, 1002345566778
Offset: 1

Views

Author

Robert Israel, Jan 15 2024

Keywords

Comments

a(n) is the first number that has n anagrams k such that A001222(k) = n.
Does 9 divide a(n) for n > 6? - David A. Corneth, Jan 16 2024

Examples

			a(4) = 135 is a term because 135 has 4 anagrams having 4 prime divisors, counted by multiplicity: 135 = 3^3 * 5, 315 = 3^2 * 5 * 7, 351 = 3^3 * 13 and 513 == 3^3 * 19, and no number < 135 works.
a(6) != 2367 because 2367 has exactly 7 anagrams with each having exactly 6 prime divisors (namely 2673, 3276, 3726, 6237, 6372, 6732, 7236). - _David A. Corneth_, Jan 16 2024
		

Crossrefs

Cf. A001222, A369184. All terms are in A179239.

Programs

  • Maple
    f:= proc(n) # numbers k such that n has k anagrams with Omega = k
            local L, W,WS,V,d, w, x, i;
          L:= convert(n, base, 10); d:= nops(L);
          L:= select(t -> t[-1] <> 0, combinat:-permute(L));
          L:= map(t-> add(t[i]*10^(i-1), i=1..d), L);
          W:= map(t -> numtheory:-bigomega(t), L);
          WS:= convert(W,set);
          for x in WS do V[x]:= 0 od;
          for x in W do V[x]:= V[x]+1 od;
          select(x -> V[x] = x, WS);
    end proc:
    g:= proc(xin,d,n) # first anagrams with n digits starting xin, all other digits >= d
      option remember;
      local i;
      if 1 + ilog10(xin) = n then return xin fi;
      seq(procname(10*xin+i,i,n), i=d..9)
    end proc:
    h:= proc(n) # first anagrams with n digits
      local i,j;
      seq(seq(g(i*10^j,i,n),j=n-1..0,-1),i=1..9)
    end proc:
    V:= 'V': m:= 0:
    for d from 1 to 9 do
      for x in h(d) do
        for y in f(x) do
          if not assigned(V[y]) then V[y]:= x: m:= max(m,y) fi
    od od od:
    seq(V[y],y=1..m);
  • Python
    from collections import Counter
    from sympy import primeomega as W
    from sympy.utilities.iterables import multiset_permutations as MP
    from itertools import combinations_with_replacement, count, islice
    def counteq(n):
        c = Counter(W(int("".join(p))) for p in MP(str(n)) if p[0]!='0')
        return [i for i in c if c[i] == i]
    def agen(): # generator of terms
        adict, n = dict(), 1
        for d in count(len(str(2**n))):
            for f in "123456789":
                for r in combinations_with_replacement("0123456789", d-1):
                    k = int(f+"".join(r))
                    for v in counteq(k):
                        if v not in adict:
                            adict[v] = k
                    while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 8))) # Michael S. Branicky, Jan 16 2024

Extensions

More terms from David A. Corneth, Jan 16 2024

A373179 a(n) is the smallest n-digit integer whose digit permutations make the maximum possible number of n-digit primes.

Original entry on oeis.org

2, 13, 149, 1237, 13789, 123479, 1235789, 12345679, 102345679, 1123456789, 10123456789, 1011233456789, 1012334567789, 10123345677899
Offset: 1

Views

Author

Gonzalo Martínez, May 26 2024

Keywords

Comments

A065851(n) is the maximum number of n-digit primes which can be made by permuting n digits.
a(n) = k is the smallest n-digit k for which A046810(k) = A065851(n).
a(n) has its relevant digits sorted and not beginning with 0 and may or may not be one of the primes (it is for n = 1 to 7, but not at n = 8).

Examples

			For n=3, A065851(3) = 4 primes are reached by permuting the digits of a(3) = 149, namely {149, 419, 491, 941}. (4 primes are also reached from 179 and 379, but they're bigger numbers.)
		

Crossrefs

Programs

  • C
    /* See links. */
  • Python
    from sympy import nextprime
    from collections import Counter
    def smallest(t):
        nz = "".join(sorted(c for c in t if c != "0"))
        s = "".join(t) if "0" not in t else nz[0]+"0"*t.count("0")+nz[1:]
        return int(s)
    def a(n):
        c, p = Counter(), nextprime(10**(n-1))
        while p < 10**n:
            c["".join(sorted(str(p)))] += 1
            p = nextprime(p)
        m = min(c.most_common(1), key=lambda x:smallest(x[0]))
        return smallest(m[0])  # m[1] generates A065851
    print([a(n) for n in range(1, 8)]) # Michael S. Branicky, May 28 2024
    

Extensions

a(9)-a(11) from Michael S. Branicky, May 27 2024
a(12)-a(14) from Kevin Ryde, Jul 16 2024

A383304 Nonnegative integers whose difference between the largest and smallest digits is equal to the arithmetic mean of its digits.

Original entry on oeis.org

0, 13, 26, 31, 39, 62, 93, 123, 132, 144, 213, 225, 231, 246, 252, 264, 267, 276, 288, 312, 321, 348, 369, 384, 396, 414, 426, 438, 441, 462, 483, 522, 624, 627, 639, 642, 672, 693, 726, 762, 828, 834, 843, 882, 936, 963, 1133, 1223, 1232, 1313, 1322, 1331, 1344, 1434, 1443
Offset: 1

Views

Author

Stefano Spezia, Apr 22 2025

Keywords

Examples

			144 is a term since 4 - 1 = 3 = (1 + 4 + 4)/3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,1500], Max[d=IntegerDigits[#]]-Min[d]==Mean[d] &]
  • Python
    def ok(n): return sum(d:=list(map(int, str(n)))) == (max(d) - min(d))*len(d)
    print([k for k in range(1500) if ok(k)]) # Michael S. Branicky, Apr 23 2025

A276739 Least k such that A045876(k) is divisible by 10^n.

Original entry on oeis.org

1, 19, 10699, 102589, 10000112389
Offset: 0

Views

Author

Altug Alkan, Sep 16 2016

Keywords

Comments

Corresponding values of A045876(k) are 1, 110, 3333300, 333333000, ...
Sequence is infinite.
a(5) > 10^18. - Giovanni Resta, Sep 27 2016
Subsequence of A179239. - David A. Corneth, Oct 01 2016

Examples

			a(1) = 19 because 19+91 = 110 is divisible by 10.
		

Crossrefs

Cf. A045876.

Programs

  • Mathematica
    Table[k = 1; While[! Divisible[Total[FromDigits /@ Permutations@ IntegerDigits@ k], 10^n], k++]; k, {n, 0, 3}] (* Michael De Vlieger, Sep 16 2016 *)
  • PARI
    A047726(n) = n=digits(n); (#n)!/prod(i=0, 9, sum(j=1, #n, n[j]==i)!);
    A055642(n) = #Str(n);
    A007953(n) = sumdigits(n);
    A045876(n) = ((10^A055642(n)-1)/9)*(A047726(n)*A007953(n)/A055642(n));
    a(n) = {my(k = 1); while (A045876(k) % (10^n), k++); k;}

Extensions

a(4) from Giovanni Resta, Sep 27 2016

A276758 Numbers n such that A045876(n) = A045876(n+1).

Original entry on oeis.org

10, 1010, 1100, 1119, 1339, 1519, 3139, 5119, 8899, 27799, 46699, 48499, 50559, 55059, 64699, 72799, 84499, 100110, 101010, 101100, 110010, 110100, 111000, 111229, 112129, 117799, 121129, 136699, 147499, 163699, 168199, 171799, 174499, 177199, 186199
Offset: 1

Views

Author

Altug Alkan, Sep 17 2016

Keywords

Comments

A138147 is a subsequence. Therefore, the sequence is infinite. - David A. Corneth, Sep 17 2016
Suppose a term is of the form SDN, where S is a sequence of digits without leading zeros, D is a digit less than 9 and N is a sequence of digits 9 (possibly 0 nines; terms from A002283) and SDN is a concatenation of S, D and N. Let S' be a permutation of digits of S without leading zeros. Then S'DN is also in the sequence. To search terms one may choose S from A179239. - David A. Corneth, Sep 18 2016
Since (n + 8*k) = (n - k + 1)*(n - k) has solutions that are n = k + 3*sqrt(k) and n = k - 3*sqrt(k), for square values of k there are infinitely many terms such that: 1119, 1111119999, 111111111999999999, ...

Examples

			1339 is a term because A045876(1339) = A045876(1340).
See 2nd comment. As 27799 is in the sequence, we can see S = 27, D = 7 and N = 99. Now all permutations S' (distinct) of S without leading zeros give terms. They are 72, giving term 72799. - _David A. Corneth_, Sep 18 2016
		

Crossrefs

Programs

Previous Showing 21-30 of 35 results. Next