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.

A278981 a(n) is the first composite number having the same base-n digits as its prime factors (with multiplicity), excluding zero digits (or 0 if no such composite number exists).

Original entry on oeis.org

15, 399, 85, 318, 57, 906, 85, 1670, 1111, 18193, 185, 7205205, 4119, 63791, 4369, 1548502, 489, 258099, 451, 408166, 13315, 1012985, 679, 25841526, 26533, 2884373, 985, 49101338, 1057, 5362755, 1285, 2447558, 179503, 3091422, 1387, 5830693854, 82311, 149338, 2005
Offset: 2

Views

Author

Ely Golden, Dec 02 2016

Keywords

Comments

For an alternate program that only checks a single base at a time, use the code from "#the actual function (alternate)" instead of "#the actual function".
The computation of a(n) is exceedingly inefficient, requiring the checking of all natural values less than a(n). A more efficient way to compute a(n) is very desirable. - Ely Golden, Dec 25 2016
There is a lower bound on a(n), if not 0, of n^2 + n + 1. As well, a(n) must have 3 or more nonzero digits in base n (if n is odd, this lower bound is n^3 + n^2 + n + 1, and a(n) must have 4 or more nonzero digits in base n). This does not significantly improve the computation of a(n), however. - Ely Golden, Dec 30 2016
The pattern in the magnitude of a(n) is unclear. For some values of n, a(n) is much larger than for other values. For example, a(65) is 2460678262, whereas a(64) is only 4369 and a(66) is 4577. It seems as though even values of n typically have smaller values of a(n). - Ely Golden, Dec 30 2016
It is known that a(n) > 0 for any nonzero member of this sequence, as well as any n >= 2 of the form A280270(m), A070689(m), A279480(m), 2*A089001(m), 2*A115104(m), and 2*A280273(m)-1. It is likely, but not known, that a(n) > 0 for all n >= 2. - Ely Golden, Dec 30 2016

Examples

			a(2) = 15, as 15 is the first composite number whose base-2 nonzero digits (1111) are the same as the base-2 nonzero digits of its prime factors (11_2 and 101_2).
		

Crossrefs

a(10) = A176670(1); a(2) = A278909(1).

Programs

  • Mathematica
    g[n_] := g[n] = Flatten[ Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]];
    f[b_] := Block[{c = b^2}, While[ PrimeQ@ c || DeleteCases[ Sort[ IntegerDigits[c, b]], 0] != DeleteCases[ Sort[ Flatten[ IntegerDigits[g[c], b]]], 0], c++]; c]; Array[f, 39, 2] (* Robert G. Wilson v, Dec 30 2016 *)
  • SageMath
    def nonZeroDigits(x,n):
        if(x<=0|n<2):
            return []
        li=[]
        while(x>0):
            d=divmod(x,n)
            if(d[1]!=0):
                li.append(d[1])
            x=d[0]
        li.sort()
        return li;
    def nonZeroFactorDigits(x,n):
        if(x<=0|n<2):
            return []
        li=[]
        f=list(factor(x))
        #ensures inequality of nonZeroFactorDigits(x,n) and nonZeroDigits(x,n) if x is prime
        if((len(f)==1)&(f[0][1]==1)):
            return [];
        for c in range(len(f)):
            for d in range(f[c][1]):
                ld=nonZeroDigits(f[c][0],n)
                li+=ld
        li.sort()
        return li;
    #the actual function
    def a(n):
        c=2
        while(nonZeroFactorDigits(c,n)!=nonZeroDigits(c,n)):
            c+=1;
        return c;
    index=2
    while(index<=100):
        print(str(index)+" "+str(a(index)))
        index+=1
    print("complete")
    #the actual function (alternate)
    def a(n):
        c=2
        while(nonZeroFactorDigits(c,n)!=nonZeroDigits(c,n)):
            c+=1;
            if(c%1000000==1):
                print("checked up to "+str(c-1))
        return c;
    x=3 # 
    print(str(x)+" "+str(a(x)))
    print("complete")

A280236 Numbers n such that A278981(n) < A278981(m) for all m > n (excluding values of m where A278981(m) = 0).

Original entry on oeis.org

2, 6, 8, 12, 20, 24, 28, 30, 32, 36, 40, 44, 48, 50, 54, 56, 60, 64, 66, 70, 72, 80, 88, 90, 96
Offset: 1

Views

Author

Ely Golden, Dec 29 2016

Keywords

Comments

It is not necessary to check A278981(m) for all values of m > n (of which there are infinitely many). One need check only values of a(m) where m^2 + m + 1 <= A278981(n), due to the lower bound of A278981(m).
It appears that all members in this sequence are even, although it is possible that some members could be odd.
It appears that, apart from 2, all members in this sequence appear in A280270. If this is the case, all members in this sequence must be even.

Examples

			6 is a member of this sequence as A278981(6) = 57, which is which is less than all the terms in A278981 which succeed it.
One need check only values of a(m) where m^2 + m + 1 <= 57. In this case, only m=7 needs to be checked, and A278981(7) = 906, with 906 >= 57. Thus A278981(6) < A278981(m) for all m > 6.
		

Crossrefs

A281189 a(n) is the first composite number having the same base-(2n) digits as its prime factors (with multiplicity), excluding zero digits (or 0 if no such composite number exists).

Original entry on oeis.org

15, 85, 57, 85, 1111, 185, 4119, 4369, 489, 451, 13315, 679, 26533, 985, 1057, 1285, 179503, 1387, 82311, 2005, 2649, 2047, 4663957, 2509, 2761, 3385, 3097, 3277, 243895, 4207, 16246817, 4369, 4577, 471651, 5401, 5629, 607839, 466429, 483731, 6817, 1009273, 10587, 1132547, 8119, 8401, 798731, 990583, 9809, 1411791, 1062517
Offset: 1

Views

Author

Ely Golden and Robert G. Wilson v, Jan 16 2017

Keywords

Comments

Bisection of A278981.
Conjecture: a(n) always exceeds 0.
If a(n) = 0 then it must be the case that there exists no more than one prime of the form (2n)^m + 1. Otherwise, the product of two such primes would satisfy the condition of A278981 in base 2n.
Records: 15, 85, 1111, 4119, 4369, 13315, 26533, 179503, 4663957, 16246817, 75927167, 120872069, 335192766, ..., .
a(76) > 2^27.

Examples

			a(2) = A278981(4) since 85 is the least composite number which satisfies the criterion of A278981.
		

Crossrefs

Programs

  • Mathematica
    g[n_] := g[n] = Flatten[ Table[#[[1]], {#[[2]]}] & /@ FactorInteger@ n]; f = Compile[{{b, _Integer}}, Block[{c = b^2}, While[ PrimeQ@ c || DeleteCases[ Sort[ IntegerDigits[c, b]], 0] != DeleteCases[ Sort[ Flatten[ IntegerDigits[ g[c], b]]], 0], c++]; c]]; Table[ f[b], {b, 2, 80, 2}]

Formula

a(n) = A278981(2n).
Showing 1-3 of 3 results.