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

A371641 The smallest composite number which divides the concatenation of its ascending ordered prime factors, with repetition, when written in base n.

Original entry on oeis.org

85329, 4, 224675, 4, 1140391, 4, 9, 4, 28749, 4, 841, 4, 9, 4, 239571, 4, 343, 4, 9, 4, 231, 4, 25, 4, 9, 4, 315, 4, 343, 4, 9, 4, 25, 4, 9761637601, 4, 9, 4, 4234329, 4, 715, 4, 9, 4, 609, 4, 49, 4, 9, 4, 195, 4, 25, 4, 9, 4, 1015, 4, 76729, 4, 9, 4, 25, 4, 14332171
Offset: 2

Views

Author

Scott R. Shannon, Mar 30 2024

Keywords

Comments

The number 4 = 2*2 in any base b = 3 + 2*n, n >= 0, will always divide the concatenation of its prime divisors as 4 = "2"_b + "2"_b = "22"_b = 2*(3 + 2*n) + 2 = 8 + 4*n, which is divisible by 4.
The number 9 = 3*3 in any base b = 8 + 6*n, n >= 0, will always divide the concatenation of its prime divisors as 9 = "3"_b + "3"_b = "33"_b = 3*(8 + 6*n) + 3 = 27 + 18*n, which is divisible by 9.
Theorem: if p is prime, then a(p*(m+2)-1) <= p^2 for all m >= 0. Proof: If p is prime and base b = p*(m+2)-1 for some m >= 0, then b > p and p expressed in base b = "p"b and thus "pp"_b = p*(b+1) = p^2*(m+2), i.e., divisible by p^2. - _Chai Wah Wu, Apr 01 2024
a(36) <= 9761637601. a(40) = 4234329. By the theorem above if n+1 is composite, then a(n) <= p^2 where p = A020639(n+1) is the smallest prime factor of n+1. The first few terms where the inequality is strict are: a(406) = 105, a(766) = 105, a(988) = 195, a(1036) = 105, a(1072) = 231, ... - Chai Wah Wu, Apr 11 2024
From Chai Wah Wu, Apr 12 2024: (Start)
Theorem: If n is even, then a(n) >= 9 is odd.
Proof: This is true for n = 2. Let n > 2 be even. Let m be even.
If m=2^k for k>1, then 2 concatenated k times in base n is 2*(n^(k-1)+...+n+1) = 2*(n^k-1)/(n-1).
Since n^k-1 is odd, m does not divide 2*(n^k-1)/(n-1). If m has an odd prime divisor then concatenating the primes in base n will result in an odd number that is not divisible by m.
Finally, a(n) >= 9 since the first odd composite number is 9. (End)

Examples

			a(2) = 85329 as 85329 = 3_10 * 3_10 * 19_10 * 499_10 = 11_2 * 11_2 * 10011_2 * 111110011_2 = "111110011111110011"_2 = 255987_10 which is divisible by 85329.
a(10) = 28749 as 28749 =  3_10 * 7_10 * 37_10 * 37_10 = "373737"_10 = 373737_10 which is divisible by 28749. See also A259047.
		

Crossrefs

Programs

  • PARI
    has(F,n)=my(f=F[2],t); for(i=1,#f~, my(p=f[i,1],d=#digits(p,n),D=n^d); for(j=1,f[i,2], t=D*t+p)); t%F[1]==0
    a(k,lim=10^6,startAt=4)=forfactored(n=startAt,lim, if(vecsum(n[2][,2])>1 && has(n,k), return(n[1]))); a(k,2*lim,lim+1) \\ Charles R Greathouse IV, Apr 11 2024
  • Python
    from itertools import count
    from sympy.ntheory import digits
    from sympy import factorint, isprime
    def fromdigits(d, b):
        n = 0
        for di in d: n *= b; n += di
        return n
    def a(n):
        for k in count(4):
            if isprime(k): continue
            sf = []
            for p, e in factorint(k).items():
                sf.extend(e*digits(p, n)[1:])
            if fromdigits(sf, n)%k == 0:
                return k
    print([a(n) for n in range(2, 6)]) # Michael S. Branicky, Apr 01 2024
    
  • Python
    from itertools import count
    from sympy import factorint, integer_log
    def A371641(n):
        for m in count(4):
            f = factorint(m)
            if sum(f.values()) > 1:
                c = 0
                for p in sorted(f):
                    a = pow(n,integer_log(p,n)[0]+1,m)
                    for _ in range(f[p]):
                        c = (c*a+p)%m
                if not c:
                    return m # Chai Wah Wu, Apr 11 2024
    

Extensions

a(36) and beyond from Michael S. Branicky, Apr 27 2024

A248915 Composite numbers which divide the concatenation of their prime factors, with multiplicity, in descending order.

Original entry on oeis.org

378, 12467, 95823, 10715274, 13485829, 111495095, 42002916561, 176685987695
Offset: 1

Views

Author

Paolo P. Lava, Oct 16 2014

Keywords

Comments

Prime numbers are not considered because they trivially satisfy the relation.
For terms in ascending order see A259047 and StackExchange link. [Paolo P. Lava, May 30 2019]
a(9) <= 3953318131772867. - Chai Wah Wu, Apr 12 2024
a(2), the bound for a(9) above, and larger terms may be found using an extension of Andersen's algorithm to arbitrary base and ordering (see links for an implementation and another term). - Michael S. Branicky, Apr 13 2024

Examples

			Prime factors of 378 are 2,3,3,3,7; concat(7,3,3,3,2) = 73332 and 73332/378 = 194.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,b,c,d,j,k,n;
    for n from 1 to q do if not isprime(n) then a:=ifactors(n)[2]; b:=[]; d:=0;
    for k from 1 to nops(a) do b:=[op(b),a[k][1]]; od; b:=sort(b);
    for k from nops(a) by -1 to 1 do c:=1; while not b[k]=a[c][1] do c:=c+1; od;
    for j from 1 to a[c][2] do d:=10^(ilog10(b[k])+1)*d+b[k]; od; od;
    if type(d/n,integer) then print(n); fi;
    fi; od; end: P(10^9);
  • PARI
    isok(n) = {my(s = ""); my(f = factor(n)); forstep (i=#f~, 1, -1, for (k=1, f[i,2], s = concat(s, Str(f[i,1])))); (eval(s) % n) == 0;} \\ Michel Marcus, Jun 16 2015

Extensions

a(7)-a(8) from Giovanni Resta, Jun 16 2015

A371696 Composite numbers that divide the reverse of the concatenation of their ascending order prime factors, with repetition.

Original entry on oeis.org

26, 38, 46, 378, 26579, 84941, 178838, 30791466, 39373022, 56405502, 227501395, 904085931, 1657827142
Offset: 1

Views

Author

Scott R. Shannon, Apr 03 2024

Keywords

Comments

a(14) > 10^10, if it exists. - Daniel Suteu, Apr 28 2024

Examples

			26 is a term as 26 = 2 * 13 = "213" which is reverse is "312", and 312 is divisible by 26.
227501395 is a term as 227501395 = 5 * 11 * 17 * 23 * 71 * 149 = "511172371149" which in reverse is "941173271115", and 941173271115 is divisible by 227501395.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, factorint
    def ok(k): return not isprime(k) and int("".join(str(p)[::-1]*e for p, e in list(factorint(k).items())[::-1]))%k == 0
    def agen(): yield from filter(ok, count(4))
    print(list(islice(agen(), 7))) # Michael S. Branicky, Apr 13 2024
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A371696_gen(startvalue=4): # generator of terms >= startvalue
        for n in count(max(startvalue,4)):
            f = factorint(n)
            if sum(f.values()) > 1:
                c = 0
                for p in sorted(f,reverse=True):
                    a = pow(10,len(s:=str(p)),n)
                    q = int(s[::-1])
                    for _ in range(f[p]):
                        c = (c*a+q)%n
                if not c:
                    yield n
    A371696_list = list(islice(A371696_gen(),6)) # Chai Wah Wu, Apr 13 2024

Extensions

a(13) from Daniel Suteu, Apr 28 2024

A371821 Composite numbers which divide the concatenation of their ascending ordered prime factors, with repetition, when written in binary.

Original entry on oeis.org

85329, 177904587, 333577497
Offset: 1

Views

Author

Scott R. Shannon, Apr 07 2024

Keywords

Comments

The base 2 version of A259047. Assuming a(4) exists it is greater than 10^10.
a(4) <= 55133857902732922904331439521901. - Chai Wah Wu, Apr 12 2024
a(1), a(3), the bound on a(4) above, and larger terms can be generated using an adaptation of the method of J. K. Andersen referenced in A259047; see linked Python program for an implementation and two more terms. - Michael S. Branicky, Apr 12 2024

Examples

			177904587 is a term as 177904587 = 3_10 * 7_10 * 103_10 * 233_10 * 353_10 = 11_2 * 111_2 * 1100111_2 * 11101001_2 * 101100001_2 = "11111110011111101001101100001"_2 = 533713761_10, which is divisible by 177904587.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import factorint
    def A371821_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            f = sorted(factorint(n,multiple=True))
            if len(f) > 1:
                c = 0
                for p in f:
                    c = ((c<A371821_list = list(islice(A371821_gen(),3)) # Chai Wah Wu, Apr 11 2024
    
  • Python
    from sympy import factorint, isprime
    def ok(n): return not isprime(n) and int("".join(bin(p)[2:]*e for p, e in factorint(n).items()), 2)%n == 0 # Michael S. Branicky, Apr 12 2024

A371695 The smallest composite number that divides the reverse of the concatenation of its ascending ordered prime factors, with repetition, when written in base n.

Original entry on oeis.org

623, 4, 114, 4, 57, 4, 9, 4, 26, 4, 185, 4, 9, 4, 1718, 4, 343, 4, 9, 4, 70, 4, 25, 4, 9, 4, 195, 4, 226, 4, 9, 4, 25, 4, 123, 4, 9, 4, 654, 4, 862, 4, 9, 4, 42, 4, 49, 4, 9, 4, 3385, 4, 25, 4, 9, 4, 238, 4, 202, 4, 9, 4, 25, 4, 453, 4, 9, 4, 2435, 4, 721, 4, 9, 4, 49, 4, 70, 4, 9, 4, 186
Offset: 2

Views

Author

Scott R. Shannon, Apr 03 2024

Keywords

Comments

See A371641 for an explanation of multiple terms being 4 and 9. The largest number in the first 10000 terms is a(5980) = 1030778.

Examples

			a(2) = 623 as 623 = 7_10 * 89_10 = 111_2 * 1011001_2 = "1111011001"_2 which when reversed is "1001101111"_2 = 623_10 which is divisible by 623.
a(4) = 114 as 114 = 2_10 * 3_10 * 19_10 = 2_4 * 3_4 * 103_4 = "23103"_4 which when reversed is "30132"_4 = 798_10 which is divisible by 114.
		

Crossrefs

Programs

  • Python
    from itertools import count
    from sympy.ntheory import digits
    from sympy import factorint, isprime
    def fromdigits(d, b):
        n = 0
        for di in d: n *= b; n += di
        return n
    def a(n):
        for k in count(4):
            if isprime(k): continue
            sf = []
            for p, e in list(factorint(k).items())[::-1]:
                sf.extend(e*digits(p, n)[1:][::-1])
            if fromdigits(sf, n)%k == 0:
                return k
    print([a(n) for n in range(2, 83)]) # Michael S. Branicky, Apr 16 2024

Formula

If n+1 is composite, then a(n) <= A020639(n+1)^2. The numbers n where n+1 is composite and a(n) < A020639(n+1)^2 are 288, 298, 340, 360, 376, 516, 526, 550, 582, 736, ... and appear to be identical to A371948. - Chai Wah Wu, Apr 16 2024

A371699 The smallest composite number which divides the concatenation of its descending ordered prime factors, with repetition, when written in base n.

Original entry on oeis.org

42, 4, 42, 4, 374, 4, 9, 4, 378, 4, 609, 4, 9, 4, 3525, 4, 343, 4, 9, 4, 70, 4, 25, 4, 9, 4, 195, 4, 343, 4, 9, 4, 25, 4, 130, 4, 9, 4, 366, 4, 3562, 4, 9, 4, 42, 4, 49, 4, 9, 4, 474, 4, 25, 4, 9, 4, 238, 4, 1131, 4, 9, 4, 25, 4, 555, 4, 9, 4, 14405, 4, 12207
Offset: 2

Views

Author

Chai Wah Wu, Apr 12 2024

Keywords

Comments

Conjecture: a(n) <= A371641(n) for n >= 2.

Examples

			a(2) = 42 since 42 = 7*3*2 = 111_2 * 11_2 * 10 _2 and 42 divides 126 = 1111110_2.
a(10) = 378 since 278 = 7*3*3*3*2 and 278 divides 73332.
		

Crossrefs

Programs

  • Python
    from itertools import count
    from sympy import factorint, integer_log
    def A371699(n):
        for m in count(4):
            f = factorint(m)
            if sum(f.values()) > 1:
                c = 0
                for p in sorted(f,reverse=True):
                    a = pow(n,integer_log(p,n)[0]+1,m)
                    for _ in range(f[p]):
                        c = (c*a+p)%m
                if not c:
                    return m

Formula

If p is prime, then a(p*(m+2)-1) <= p^2 for all m >= 0.
If n+1 is composite, then a(n) <= q^2, where q = A020639(n+1) is the smallest prime factor of n+1. This implies that if n > 2 is odd, then a(n) = A371641(n) = 4.
The first few terms n where n+1 is composite and a(n) < A020639(n+1)^2 are a(288) = 70, a(298) = 42, a(340) = 42, a(360) = 182, ...
If n is even, then a(n) >= 9. This is true as it is easy to verify that a(n) cannot be equal to 4, 6 or 8 in this case.
Suppose n>2 is even. 2 concatenated twice in base n is 2(n+1) which is not divisible by 4.
Next, 3 concatenated by 2 is 3*n+2 which is not divisible by 6. Finally 2 concatenated 3 times is 2(n^3-1)/(n-1) which is not divisible by 8 since n^3-1 is odd.
This implies that if n = 6*k+2 for some k > 0, then a(n) = A371641(n) = 9.

A371900 Numbers k such that k+1 is composite and A371641(k) != p^2 where p = A020639(k+1) is the smallest prime factor of k+1.

Original entry on oeis.org

406, 766, 988, 1036, 1072, 1138, 1246, 1396, 1402, 1456, 1500, 1642, 1738, 1762, 1768, 1816, 1918, 1926, 1942, 2076, 2116, 2158, 2182, 2278, 2506, 2716, 2746, 2812, 2866, 2920, 2992, 3076, 3148, 3172, 3286, 3316, 3382, 3496, 3568, 3682, 3706, 3712, 3742, 3762
Offset: 1

Views

Author

Chai Wah Wu, Apr 11 2024

Keywords

Comments

If k+1 is composite, then A371641(k) <= A020639(k+1)^2. This sequence lists numbers k where the inequality is strict.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, primefactors, factorint, integer_log
    def A371900_gen(startvalue=2): # generator of terms >= startvalue
        for n in count(max(startvalue,2)):
            if not isprime(n+1):
                q = min(primefactors(n+1))
                for m in range(4,q**2):
                    f = factorint(m)
                    if sum(f.values()) > 1:
                        c = 0
                        for p in sorted(f):
                            a = pow(n,integer_log(p,n)[0]+1,m)
                            for _ in range(f[p]):
                                c = (c*a+p)%m
                        if not c:
                            yield n
                            break
    A371900_list = list(islice(A371900_gen(),30))

A371948 Numbers k such that k+1 is composite and A371699(k) != p^2 where p = A020639(k+1) is the smallest prime factor of k+1.

Original entry on oeis.org

288, 298, 340, 360, 376, 516, 526, 550, 582, 736, 778, 792, 802, 816, 892, 988, 1002, 1006, 1072, 1138, 1146, 1198, 1206, 1246, 1270, 1338, 1342, 1348, 1356, 1390, 1402, 1456, 1500, 1516, 1536, 1576, 1632, 1642, 1702, 1726, 1738, 1750, 1768, 1816, 1828, 1842
Offset: 1

Views

Author

Chai Wah Wu, Apr 13 2024

Keywords

Comments

If k+1 is composite, then A371699(k) <= A020639(k+1)^2. This sequence lists numbers k where the inequality is strict.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, primefactors, factorint, integer_log
    def A371948_gen(startvalue=2): # generator of terms >= startvalue
        for n in count(max(startvalue,2)):
            if not isprime(n+1):
                q = min(primefactors(n+1))
                for m in range(4,q**2):
                    f = factorint(m)
                    if sum(f.values()) > 1:
                        c = 0
                        for p in sorted(f,reverse=True):
                            a = pow(n,integer_log(p,n)[0]+1,m)
                            for _ in range(f[p]):
                                c = (c*a+p)%m
                        if not c:
                            yield n
                            break
    A371948_list = list(islice(A371948_gen(), 30))

A349705 Numbers k such that the concatenation in increasing order of their prime factors, with multiplicity, is congruent to 1 (mod k).

Original entry on oeis.org

36, 39, 66, 1435, 5714, 6410, 13861, 22564, 27346, 33137, 45542, 79260, 171860, 268218, 442068, 486127, 675423, 2287527, 3710027, 9610766, 14318290, 26293568, 29361702, 49703324, 227358366, 433100023, 442960845, 479174118, 1221238938, 1243718114, 4053362596, 8620689655
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Nov 25 2021

Keywords

Examples

			a(3) = 66 is a term because the concatenation of its prime factors is 2311 and 2311 == 1 (mod 66).
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,t;
      lcat(map(t -> t[1]$t[2], sort( ifactors(n)[2], (a,b) -> a[1] < b[1]))) mod n = 1;
    end proc:
    select(filter, [$1..10^7]);
  • Mathematica
    upto=10^5;a={};Do[If[Mod[FromDigits[Flatten[Map[IntegerDigits[ConstantArray[First[#],Last[#]]]&,FactorInteger[k]]]],k]==1,AppendTo[a,k]],{k,upto}];a (* Paolo Xausa, Nov 26 2021 *)
  • Python
    from sympy import factorint
    def ok(k): return int("".join(map(str, factorint(k, multiple=True))))%k == 1
    print([k for k in range(2, 10**5) if ok(k)]) # Michael S. Branicky, Nov 26 2021
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A349705_gen(startvalue=1): # generator of terms >= startvalue
        for k in count(max(startvalue,1)):
            c = 0
            for d in sorted(factorint(k,multiple=True)):
                c = (c*10**len(str(d)) + d) % k
            if c == 1:
                yield k
    A349705_list = list(islice(A349705_gen(),10)) # Chai Wah Wu, Feb 28 2022

Extensions

a(28)-a(32) from Martin Ehrenstein, Nov 27 2021
Showing 1-9 of 9 results.