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-3 of 3 results.

A239060 Nonprime numbers whose divisors all appear as a substring in the number's decimal expansion.

Original entry on oeis.org

1, 125, 17692313
Offset: 1

Views

Author

M. F. Hasler, Mar 09 2014

Keywords

Comments

This is the subsequence of A239058 without the primes having a digit 1, A208270. It is thus a subsequence of A092911 (all divisors can be formed using the digits of the number) which is a subsequence of A011531 (numbers having the digit 1).
The term a(3)=17692313=A239058(870356), as well as the numbers 4482669527413081, 21465097175420089, and 567533481816008761 which are also members, were found by Charles R Greathouse IV, Mar 09 2014
The square of any term of A115738 is a member of this sequence. The above larger examples are of that form.
a(4) > 10^12. - Giovanni Resta, Sep 08 2018

Examples

			The divisors of 17692313 are {1, 23, 769231, 17692313}; it can be seen that all of them occur as a substring in 17692313, therefore 17692313 is in this sequence.
		

Crossrefs

Programs

  • PARI
    is(n)=!isprime(n)&&is_A239058(n)
    
  • PARI
    overlap(long,short)=my(D=10^#digits(short)); while(long>=short, if(long%D==short,return(1));long\=10); 0
    is(n)=my(d=divisors(n)); #d!=2 && !forstep(i=#d-1,1,-1, if(!overlap(n,d[i]), return(0))) \\ Charles R Greathouse IV, Mar 09 2014

A355620 a(n) is the sum of the divisors of n whose decimal expansions appear as substrings in the decimal expansion of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 14, 15, 21, 17, 18, 19, 20, 22, 22, 24, 23, 30, 30, 28, 27, 30, 29, 33, 32, 34, 36, 34, 40, 45, 37, 38, 42, 44, 42, 44, 43, 48, 50, 46, 47, 60, 49, 55, 52, 54, 53, 54, 60, 56, 57, 58, 59, 66, 62, 64, 66, 68, 70, 72, 67
Offset: 1

Views

Author

Rémy Sigrist, Jul 10 2022

Keywords

Examples

			For n = 110:
- the divisors of 110 are: 1, 2, 5, 10, 11, 22, 55, 110,
- 1, 10, 11 and 110 appear as substrings in 110,
- so a(110) = 1 + 10 + 11 + 110 = 132.
		

Crossrefs

Cf. A000203, A002275, A121041, A121042, A239058, A355633 (binary analog).

Programs

  • Mathematica
    Table[DivisorSum[n, # &, StringContainsQ[IntegerString[n], IntegerString[#]] &], {n, 100}] (* Paolo Xausa, Jul 23 2024 *)
  • PARI
    a(n, base=10) = { my (d=digits(n, base), s=setbinop((i,j) -> fromdigits(d[i..j], base), [1..#d]), v=0); for (k=1, #s, if (s[k] && n%s[k]==0, v+=s[k])); return (v) }
    
  • Python
    from sympy import divisors
    def a(n):
        s = str(n)
        return sum(d for d in divisors(n, generator=True) if str(d) in s)
    print([a(n) for n in range(1, 68)]) # Michael S. Branicky, Jul 10 2022

Formula

a(n) >= n.
a(n) <= A000203(n) with equality iff n belongs to A239058.
a(10^n) = A002275(n+1) for any n >= 0.

A352584 Numbers k whose decimal representation contains all distinct prime factors of k as substrings.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 32, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 125, 127, 128, 131, 135, 137, 139, 149, 151, 157, 163, 167, 173, 175, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 243, 250
Offset: 1

Views

Author

Ivan N. Ianakiev, Mar 21 2022

Keywords

Comments

All primes (A000040) and powers of 5 (A000351 without 1) are terms.

Crossrefs

Cf. A000040, A000351, A239058 (divisor substrings).

Programs

  • Mathematica
    str[n_]:=ToString/@First/@FactorInteger[n];
    fQ[n_]:=Union[Table[StringContainsQ[ToString[n],str[n][[i]]],{i,Length[str[n]]}]]=={True}; Select[Range[2,1000],fQ]
    dpfQ[n_]:=Union[SequenceCount[IntegerDigits[n],IntegerDigits[#]]&/@(FactorInteger[n][[;;,1]])] == {1}; Select[Range[2,300],dpfQ] (* Harvey P. Dale, May 30 2023 *)
Showing 1-3 of 3 results.