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: Sergio Pimentel

Sergio Pimentel's wiki page.

Sergio Pimentel has authored 82 sequences. Here are the ten most recent ones:

A384665 Smallest odd multiplier k such that k*n is abundant.

Original entry on oeis.org

945, 9, 315, 3, 189, 3, 135, 3, 105, 3, 315, 1, 315, 3, 63, 3, 315, 1, 315, 1, 45, 3, 315, 1, 63, 3, 35, 3, 315, 1, 315, 3, 105, 3, 27, 1, 315, 3, 105, 1, 315, 1, 315, 3, 21, 3, 315, 1, 45, 3, 105, 3, 315, 1, 63, 1, 105, 3, 315, 1, 315, 3, 15, 3, 63, 1, 315, 3
Offset: 1

Author

Sergio Pimentel, Jun 06 2025

Keywords

Comments

a(n) <= 945 for all n. a(n) = 945 for prime numbers > 103.
The possible values appear to be: 1, 3, 5, 7, 9, 15, 21, 25, 27, 35, 45, 63, 105, 135, 189, 315, 945. - Michel Marcus, Jun 12 2025

Examples

			a(5) = 189 because 189 is the smallest odd multiplier k such that 5*k is abundant (i.e., 5*189 = 945 which is abundant).
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      for k from 1 by 2 do if numtheory:-sigma(n*k) > 2*n*k then return k fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jun 09 2025
  • Mathematica
    a[n_] := Module[{k = 1}, While[DivisorSigma[-1, k*n] <= 2, k += 2]; k]; Array[a, 100] (* Amiram Eldar, Jun 06 2025 *)
  • PARI
    a(n) = my(k=1); while (sigma(k*n,-1)<=2, k+=2); k; \\ Michel Marcus, Jun 09 2025

A382606 Natural numbers ordered by the probability (highest to lowest) to occur in the sum of repeated rolls of a fair 6-sided die.

Original entry on oeis.org

6, 5, 11, 12, 10, 16, 17, 15, 21, 22, 27, 23, 26, 28, 32, 33, 38, 37, 39, 43, 44, 49, 48, 50, 54, 55, 60, 59, 53, 65, 61, 66, 64, 70, 71, 76, 75, 77, 81, 82, 87, 72, 86, 88, 92, 93, 98, 97, 103, 99, 104, 102, 108, 109, 114, 115, 113, 110, 119, 120, 125, 124, 126
Offset: 1

Author

Sergio Pimentel, Mar 31 2025

Keywords

Comments

The asymptotic probability for large n is 2/7 since the average roll of a die is 7/2.
Only terms with probability > 2/7 occur. - Michael S. Branicky, Apr 01 2025
Of any six consecutive integers, at least one is present and gives a maximum in the sequence (i.e., all terms preceding it are smaller). - Javier Múgica, May 01 2025

Examples

			The probability of achieving a '6' in n>=6 rolls is 1/6 + 5/36 + 10/216 + 10/1296 + 5/7776 + 1/46656 which is about 36.02%.
The probability of achieving a '1' is just 1/6 (about 16.67%). 6 is the highest of all, so a(1) = 6.
		

Crossrefs

Complement of A382607. Cf. A365443.

Programs

  • Python
    from fractions import Fraction
    from math import factorial, prod
    from itertools import count, islice
    from sympy.utilities.iterables import partitions
    def prob(n): return sum(factorial(N:=sum(p.values()))//prod(factorial(v) for v in p.values())*Fraction(1, 6**N) for p in partitions(n, k=6))
    def agen(): # generator of terms
        n, vdict = 1, dict()
        for k in count(1):
            vdict[prob(k)] = k
            if k%6 == 0:
                s = [vdict[v] for v in sorted(vdict, reverse=True) if v > Fraction(2, 7)]
                yield from (s[i-1] for i in range(n, len(s)-1))
                n = len(s) - 1
    print(list(islice(agen(), 20))) # Michael S. Branicky, Apr 01 2025

A382607 Natural numbers ordered by the probability (lowest to highest) to occur in the sum of repeated rolls of a fair 6-sided die.

Original entry on oeis.org

1, 2, 3, 7, 4, 8, 13, 9, 14, 19, 18, 24, 25, 20, 30, 29, 31, 35, 36, 41, 40, 34, 46, 42, 47, 45, 51, 52, 57, 56, 58, 62, 63, 68, 67, 69, 73, 74, 79, 78, 84, 80, 85, 83, 89, 90, 95, 94, 96, 100, 101, 91, 106, 105, 107, 111, 112, 117, 116, 122, 118, 123, 128, 127
Offset: 1

Author

Sergio Pimentel, Mar 31 2025

Keywords

Comments

The asymptotic probability for large n is 2/7 since the average roll of a die is 7/2.
Only terms with probability < 2/7 occur. - Michael S. Branicky, Apr 01 2025
Of any six consecutive integers, at least one is present and gives a maximum in the sequence (i.e., all terms preceding it are smaller). - Javier Múgica, May 01 2025

Examples

			The probability of achieving a '6' in n>=6 rolls is 1/6 + 5/36 + 10/216 + 10/1296 + 5/7776 + 1/46656 which is about 36.02%.
The probability of achieving a '1' is just 1/6 (about 16.67%). 1 is the lowest of all, so a(1)=1.
		

Crossrefs

Complement of A382606. Cf. A365443.

Programs

  • Python
    from fractions import Fraction
    from math import factorial, prod
    from itertools import count, islice
    from sympy.utilities.iterables import partitions
    def prob(n): return sum(factorial(N:=sum(p.values()))//prod(factorial(v) for v in p.values())*Fraction(1, 6**N) for p in partitions(n, k=6))
    def agen(): # generator of terms
        n, vdict = 1, dict()
        for k in count(1):
            vdict[prob(k)] = k
            if k%6 == 0:
                s = [vdict[v] for v in sorted(vdict) if v < Fraction(2, 7)]
                yield from (s[i-1] for i in range(n, len(s)-1))
                n = len(s) - 1
    print(list(islice(agen(), 20))) # Michael S. Branicky, Apr 01 2025

A382237 Numbers that are not divisible by the sum of any subset of their digits.

Original entry on oeis.org

23, 29, 34, 37, 38, 43, 46, 47, 49, 53, 56, 57, 58, 59, 67, 68, 69, 73, 74, 76, 78, 79, 83, 86, 87, 89, 94, 97, 98, 203, 223, 227, 229, 233, 239, 249, 253, 257, 263, 267, 269, 277, 283, 293, 299, 307, 323, 329, 334, 337, 338, 346, 347, 349, 353, 356, 358, 359, 367, 373, 376, 377, 379, 380, 383, 386, 388, 389, 394, 397, 398, 403
Offset: 1

Author

Sergio Pimentel, Mar 19 2025

Keywords

Comments

This sequence has density zero since no numbers with the digit '1' are in it. The sequence is infinite. Example: Numbers like 23, 203, 2003, 20003, etc. are included because none of them is divisible by 2, 3, or 5.
Conjecture: after a sufficiently large n this sequence grows faster than the prime numbers.

Examples

			358 is in the sequence because it can't be divided by 3, 5, 8, (3+5)=8, (3+8)=11, (5+8)=13 or (3+5+8)=16.
289 is not in the sequence because it can be divided by (8+9)=17.
		

Programs

  • Maple
    filter:= proc(n) local L,S;
      L:= convert(n,base,10);
      andmap(s -> s=0 or n mod s <> 0, map(convert,combinat:-choose(L),`+`))
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Mar 19 2025
  • PARI
    isok(k) = my(d=digits(k)); forsubset(#d, s, my(ss=sum(i=1, #s, d[s[i]])); if (ss && !(k % sum(i=1, #s, d[s[i]])), return(0))); return(1); \\ Michel Marcus, Mar 27 2025
    
  • Python
    from itertools import chain, combinations
    def powerset(s): # skipping empty set
        return chain.from_iterable(combinations(s, r) for r in range(1, len(s)+1))
    def ok(n): return all(n%t!=0 for s in powerset(list(map(int, str(n)))) if (t:=sum(s))>0)
    print([k for k in range(1, 404) if ok(k)]) # Michael S. Branicky, Apr 01 2025

A380745 a(0) = 0; a(n) = the number of times a(n-1) has the same digits in common with a previous term, in any permutation.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2
Offset: 0

Author

Sergio Pimentel, Jan 31 2025

Keywords

Comments

To find a(n), let L be the multiset of the digits of a(n-1). Then a(n) is the number of terms a(i), 0 <= i <= n-2, which also have L as the multiset of its digits. - N. J. A. Sloane, Mar 27 2025

Examples

			a(43) = 1 since a(42) = 21 and previously there is only one number in the sequence that contains both a 1 and a 2.
a(104) = 3 since a(103) = 11 and previously there are 3 numbers in the sequence that contain two 1's.
a(9942) = 14 since a(9941) = 155 and previously there are 14 numbers in the sequence that contain one 1 and two 5's.
		

Crossrefs

Programs

A380690 a(0) = 0; a(n) = the number of times a(n-1) has all digits in common with a previous term.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 12, 0, 12, 1, 13, 0, 13, 1, 14, 0, 14, 1, 15, 0, 15, 1, 16, 0, 16, 1, 17, 0, 17, 1, 18, 0, 18, 1, 19, 0, 19, 1, 20, 0, 20, 1, 21
Offset: 0

Author

Sergio Pimentel, Jan 30 2025

Keywords

Comments

Every number should appear a limited number of times in the sequence as opposed as in A326834.

Examples

			a(24) = 2 since a(23) = 1 and previously there are two numbers that only have the digit '1': a(22) = 11 and a(2) = 1.
a(4062) = 113 since a(4061) = 112 and previously there are 113 occurrences of numbers that only have the digits '1' and '2' such as 12,21,112,121,122.
		

Crossrefs

Programs

A378024 Smallest k >= 10 whose decimal representation read in base (n+10) is a multiple of k.

Original entry on oeis.org

1913268348854, 11788, 1557, 126357, 145, 1038, 1757, 116, 153, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 10, 31, 16, 11, 17, 35, 12, 37, 19, 13, 10, 41, 14, 43, 11, 15, 23, 47, 12, 49, 10, 17, 13, 53, 18, 11, 14, 19, 29, 59, 10, 61
Offset: 1

Author

Sergio Pimentel, Nov 14 2024

Keywords

Comments

This is a variation of A139285 that has terms beyond n=10.

Examples

			a(5)=145 because 145 read in base 15 is 1*15^2+4*15+5=290 = 2*145 and no other number below 145 has this property except for the trivial values < 10.
		

Crossrefs

Cf. A139285.

Programs

  • PARI
    a(n) = my(k=10); while(fromdigits(digits(k), n+10) % k, k++); k; \\ Michel Marcus, Nov 16 2024

Extensions

More terms from Michel Marcus, Nov 16 2024

A371561 Numbers with multiplicative digital root of 5 that are free of 1s and have their digits in ascending order.

Original entry on oeis.org

5, 35, 57, 355, 359, 557, 579, 3335, 3357, 5579, 5777, 33557, 35559, 333555, 357799, 557779, 3335779, 3355777, 33333577
Offset: 1

Author

Sergio Pimentel, Mar 27 2024

Keywords

Comments

Conjectured to be complete.
If it exists, a(20) > 10^500. - Michael S. Branicky, Apr 18 2024

Crossrefs

Programs

  • Mathematica
    A031347 = Table[NestWhile[Times @@ IntegerDigits[#] &, n, # > 9 &], {n, 1, 100000}]; Select[Range[100000], A031347[[#]] == 5 && DigitCount[#, 10, 1] == 0 && Sort[IntegerDigits[#]] == IntegerDigits[#] &] (* Vaclav Kotesovec, Apr 17 2024 *)
  • Python
    from math import prod
    from itertools import count, islice, combinations_with_replacement as mc
    def A031347(n):
        while n > 9: n = prod(map(int, str(n)))
        return n
    def bgen(): yield from (m for d in count(1) for m in mc((3,5,7,9), d))
    def agen(): yield from (int("".join(map(str, t))) for t in bgen() if A031347(prod(t)) == 5)
    print(list(islice(agen(), 19))) # Michael S. Branicky, Apr 17 2024, edited Apr 18 2024 after Chai Wah Wu
    
  • Python
    from math import prod
    from itertools import count, islice
    def A371561_gen(): # generator of terms
        for l in count(1):
            for a in range(l,-1,-1):
                a3 = 3**a
                for b in range(l-a,-1,-1):
                    b3 = a3*5**b
                    for c in range(l-a-b,-1,-1):
                        d = l-a-b-c
                        d3 = b3*7**c*9**d
                        while d3 > 9:
                            d3 = prod(int(x) for x in str(d3))
                        if d3==5:
                            yield (10**(a+b+c+d)-1)//3+(10**d*(10**c*(10**b+1)+1)-3)*2//9
    A371561_list = list(islice(A371561_gen(),19)) # Chai Wah Wu, Apr 17 2024

A370748 a(0)=1; a(n) = sum of all previous terms, eliminating repeated digits (starting from the left).

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 653, 6189, 7238, 7961, 875, 8452, 9604, 10658, 176, 17342, 13468, 14852, 16304, 179308, 35861, 3947, 39842, 43826, 48209, 5301, 53602, 589204, 17840, 196248, 139246, 153742, 16854
Offset: 0

Author

Sergio Pimentel, Mar 07 2024

Keywords

Comments

Duplicate digits are eliminated as in A137564.
No term can be greater than 9876543210.
a(260390084) = 9876543210. - Michael S. Branicky, Apr 09 2024

Examples

			a(17) = 653 since the sum of a(0) through a(16) is 65536, and eliminating repeated digits gives a(17) = A137564(65536) = 653.
		

Crossrefs

Cf. A371863 (records), A371864 (indices of records).

Programs

  • Mathematica
    seq={1};Do[s=Total[seq];AppendTo[seq,FromDigits[DeleteDuplicates[IntegerDigits[s]]]],43];seq (* James C. McMahon, Apr 09 2024 *)
  • PARI
    f(n) = my(d=digits(n)); fromdigits(vecextract(d, vecsort(vecsort(d, , 9)))) \\ A137564
    lista(nn) = my(va=vector(nn)); va[1] = 1; for (n=2, nn, va[n] = f(sum(j=1, n-1, va[j]));); va; \\ Michel Marcus, Mar 08 2024
    
  • Python
    from itertools import islice
    def A137564(n):
        seen, out, s = set(), "", str(n)
        for d in s:
            if d not in seen: out += d; seen.add(d)
        return int(out)
    def A370748gen(): # generator of terms
        an, s = 1, 0
        while True:
            yield an
            s += an
            an = A137564(s)
    print(list(islice(A370748gen(), 45))) # Michael S. Branicky, Apr 09 2024

A370254 a(0) = 1, a(n) = result of eliminating the digit 7 from the sum of all previous terms for n>=1.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 3268, 36036, 202, 224, 2498, 4996, 9992, 89984, 19968, 199936, 39982, 439854, 8908, 888616, 1232, 18464, 196928, 1993856, 39812, 402524, 4430048, 8860096, 120192, 1840384, 1968068
Offset: 0

Author

Sergio Pimentel, Feb 13 2024

Keywords

Examples

			a(16) = 3268 since the sum of a(0)..a(15) = 32768. Eliminating the "7" we get 3268.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, (l-> add(l[i]*10^(i-1),
          i=1..nops(l)))(subs(7=NULL, convert(s(n-1), base, 10))))
        end:
    s:= proc(n) option remember; `if`(n<0, 0, s(n-1)+a(n)) end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Feb 15 2024
  • Mathematica
    Module[{nmax=50, s=1, a}, NestList[(s+=(a=FromDigits[DeleteCases[IntegerDigits[s], 7]]); a) &, s, nmax]] (* Paolo Xausa, Feb 19 2024 *)
  • PARI
    lista(nn) = my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = sum(k=1, n-1, va[k]); my(d=digits(va[n])); if (vecsearch(Set(d), 7), my(list = List()); for (i=1, #d, if (d[i] !=7, listput(list, d[i]));); va[n] = fromdigits(Vec(list)););); va; \\ Michel Marcus, Feb 13 2024

Formula

a(n) = A004182(Sum_{i=0..n-1} a(i)) for n >= 1, a(0) = 1.
a(n) = A011782(n) for n <= 15.