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-10 of 38 results. Next

A075023 a(n) = the smallest prime divisor of A173426(n) = concatenation of (1, 2, 3,..., n, n-1, ..., 1) for n > 1; a(1) = 1.

Original entry on oeis.org

1, 11, 3, 11, 41, 3, 239, 11, 3, 12345678910987654321, 7, 3, 1109, 7, 3, 71, 7, 3, 251, 7, 3, 70607, 7, 3, 989931671244066864878631629, 7, 3, 149, 7, 3, 827, 7, 3, 197, 7, 3, 39907897297, 7, 3, 17047, 7, 3, 191, 7, 3, 967, 7, 3, 139121, 7, 3, 109, 7, 3, 5333, 7, 3
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Examples

			a(5) = 41 as 123454321 = 41*41*271*271.
a(25) = 989931671244066864878631629 is the smaller factor of the semiprime A173426(24) = a(25) * A075023(25).
A173426(37) = 39907897297 * P58 * P59, where Pxx are primes with xx digits, therefore a(37) = 39907897297.
		

Crossrefs

Programs

  • PARI
    A075023(n)=A020639(A173426(n)) \\ Efficient code for computing the least prime factor should be developed in A020639. For n = 37, use \g3 (debugging level 3) to see the lpf within milliseconds, while factorization would take hours. - M. F. Hasler, Jul 29 2015

Formula

a(n) = A020639(A173426(n)). a(3n) = 3 for all n > 0. a(3n-1) = 7 for 3 < n < 34. - M. F. Hasler, Jul 29 2015

Extensions

More terms from Sascha Kurz, Jan 03 2003
Terms beyond a(24) from M. F. Hasler, Jul 29 2015

A075024 a(n) is the largest prime divisor of the number A173426(n) = concatenate(1,2,...,n-1,n,n-1,...,2,1); a(1) = 1.

Original entry on oeis.org

1, 11, 37, 101, 271, 37, 4649, 137, 333667, 12345678910987654321, 17636684157301569664903, 2799473675762179389994681, 2354041513534224607850261, 2068140300159522133, 498056174529497, 112240064764214229701, 4188353169004802474320231191377
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Comments

Also for 1 < n < 10, a(n) is the common prime divisor for all A010785(m) which consist of n digits. - Alexander R. Povolotsky, Jun 05 2014, corrected by M. F. Hasler, Jul 30 2015
According to the definition (and given terms), this is the greatest prime factor (A006530) of A173426 and not of A002477, as an earlier formula asserted and which may have been an assumption of the preceding comment. - M. F. Hasler, Jul 29 2015

Examples

			a(5) = 271 as 123454321 = 41*41*271*271.
a(25) = 12471243489559387823527232424981012432152516319410549 is the larger factor of the semiprime A173426(24) = A075023(25) * a(n).
		

Crossrefs

Programs

  • Mathematica
    Table[FactorInteger[FromDigits[Join[Flatten[IntegerDigits/@Range[ n]], Flatten[ IntegerDigits/@Range[n-1,1,-1]]]]][[-1,1]],{n,20}] (* Harvey P. Dale, May 20 2016 *)
  • PARI
    a(n) = {if (n == 1, return (1)); s = ""; for (i=1, n, s = concat(s, Str(i));); forstep (i=n-1, 1, -1, s = concat(s, Str(i));); f = factor(eval(s)); f[#f~, 1];} \\ Michel Marcus, Jun 05 2014
    
  • PARI
    A075024(n)=A006530(A173426(n)) \\ A006530 should provide efficient code and also covers the case n=1. - M. F. Hasler, Jul 29 2015

Formula

a(n) = A006530(A173426(n)). - Michel Marcus, Jun 05 2014, corrected by M. F. Hasler, Jul 29 2015

Extensions

More terms from Sascha Kurz, Jan 03 2003
a(16)-a(17) from Michel Marcus, Jun 05 2014
More terms from M. F. Hasler, Jul 29 2015

A260587 Number of distinct prime factors of A173426(n) = concatenation of (1, 2, ..., n, n-1, ..., 1).

Original entry on oeis.org

0, 1, 2, 2, 2, 5, 2, 4, 3, 1, 2, 3, 3, 6, 6, 4, 4, 4, 6, 2, 5, 3, 4, 8, 2, 6, 8, 2, 4, 9, 4, 9, 6, 6, 6, 7, 3, 5, 7, 4, 6, 6, 3, 6
Offset: 1

Views

Author

M. F. Hasler, Jul 29 2015

Keywords

Examples

			a(2) = 1 since A173426(2) = 121 = 11*11 has only one distinct prime factor, 11.
a(21) = 5 since A173426(21) = 3^2 * 7 * 828703 * 94364768151913037621 * 250591098443370396365457961250972909.
a(25) = 2 since A173426(25) = A075023(n) * A075024(n) is a semiprime.
		

Crossrefs

Cf. A001221.
See A260588 for the variant where prime factors are counted with multiplicity.
See also A075023 and A075024 for the smallest and largest prime factor of the terms.

Programs

Extensions

a(38)-a(44) added using factordb.com by Jinyuan Wang, Mar 05 2020

A260588 Number of prime factors, counted with multiplicity, of A173426(n) = concatenation of (1, 2, ..., n, n-1, ..., 1).

Original entry on oeis.org

0, 2, 4, 4, 4, 10, 4, 8, 8, 1, 2, 5, 3, 6, 7, 4, 5, 8, 6, 2, 6, 3, 4, 9, 2, 6, 11, 2, 4, 10, 4, 9, 8, 6, 6, 12, 3, 6, 8, 4, 6, 7, 3, 6
Offset: 1

Views

Author

M. F. Hasler, Jul 29 2015

Keywords

Examples

			a(2) = 2 since A173426(2) = 121 = 11*11 has twice the factor 11.
a(21) = 6 since A173426(21) = 3 * 3 * 7 * 828703 * 94364768151913037621 * 250591098443370396365457961250972909.
		

Crossrefs

See A260587 for the variant where only distinct prime factors are counted.
See also A075023 and A075024 for the smallest and largest prime factor of the terms.
Cf. A001222.

Programs

Formula

a(n) = A001222(A173426(n)).

Extensions

Terms beyond a(30) via factorization results by Serge Batalov, added by M. F. Hasler, Jul 30 2015
a(38)-a(44) added using factordb.com by Jinyuan Wang, Mar 05 2020

A260589 Irregular table read by rows: n-th row lists the prime factors of A173426(n), with repetition.

Original entry on oeis.org

11, 11, 3, 3, 37, 37, 11, 11, 101, 101, 41, 41, 271, 271, 3, 3, 7, 7, 11, 11, 13, 13, 37, 37, 239, 239, 4649, 4649, 11, 11, 73, 73, 101, 101, 137, 137, 3, 3, 3, 3, 37, 37, 333667, 333667, 12345678910987654321, 7, 17636684157301569664903, 3, 3, 7, 7, 2799473675762179389994681, 1109, 4729
Offset: 1

Views

Author

M. F. Hasler, Jul 29 2015

Keywords

Comments

Row lengths are given by A260588(n). In particular, row n = 1 would have length 0, i.e., no element, because A173426(1) = 1 has no prime factors. Therefore the sequence can be considered to start with row n = 2. (The offset refers to the k-th element of the "flattened" sequence.)
For n = 1 through n = 9, A173426(n) is the square of the repunit 1...1 of length n, therefore every prime factor appears twice. This is no longer the case for n > 9.

Crossrefs

Programs

Formula

n | A173426(n) | factors = n-th row of this table
1 | 1 | []
2 | 121 | [11, 11]
3 | 12321 | [3, 3, 37, 37]
4 | 1234321 | [11, 11, 101, 101]
5 | 123454321 | [41, 41, 271, 271]
6 | 12345654321 | [3, 3, 7, 7, 11, 11, 13, 13, 37, 37]

A260597 Primes as they occur for the first time as factors of terms of A173426 = concatenation(1,2,...,n,n-1,...,1).

Original entry on oeis.org

11, 3, 37, 101, 41, 271, 7, 13, 239, 4649, 73, 137, 333667, 12345678910987654321, 17636684157301569664903, 2799473675762179389994681, 1109, 4729, 2354041513534224607850261, 571, 3167, 10723, 439781, 2068140300159522133, 75401, 687437, 759077450603
Offset: 1

Views

Author

M. F. Hasler, Jul 29 2015

Keywords

Comments

Or, distinct elements of A260589 in the order they occur for the first time.

Examples

			A173426(1) = 1;  A173426(2) = 121 = 11^2 => a(1) = 11.
A173426(3) = 12321 = 3^2 37^2 => a(2..3) = (3, 37).
A173426(4) = 1234321 = 11^2 101^2 => a(4) = 101.
A173426(5) = 123454321 = 41^2 271^2 => a(5..6) = (41, 271).
A173426(6) = 12345654321 = 3^2 7^2 11^2 13^2 37^2 => a(7..8) = (7, 13).
		

Programs

  • PARI
    S=[];apply(t->S=setunion(S,t=setminus(Set(t),S));t, vector(30,n,A260589_row(n)))
    
  • Python
    from sympy import primefactors
    A260597_list = []
    for n in range(1,10):
        m = primefactors(int(''.join([str(d) for d in range(1,n+1)]+[str(d) for d in range(n-1,0,-1)])))
        for p in m:
            if not p in A260597_list:
                A260597_list.append(p) # Chai Wah Wu, Aug 11 2015

A359148 1, together with numbers k such that A173426(k) is prime.

Original entry on oeis.org

1, 10, 2446
Offset: 1

Views

Author

N. J. A. Sloane, Feb 17 2023

Keywords

Comments

Many of the comments following the "Most Wanted Prime" video assumed that A173426(1) was 11, and so "Numbers k such that A173426(k) is prime" should begin 1, 10, 2446, ... This is incorrect, A173426(1) = 1 and is not prime.
However, if the 1 is omitted the sequence is too short to include in the OEIS, so the present sequence will serve as a place-holder until we find the next term.
Its inclusion could also be justified by the OEIS policy of including published but erroneous sequences to serve as pointers to the correct versions.
Serge Batalov comments (see A173426) that a(4) >= 60000.

Crossrefs

A362680 a(n) is the number of decimal digits in A173426(n).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232
Offset: 1

Views

Author

David Cleaver, Apr 29 2023

Keywords

Examples

			a(12)=28 since 1234567891011121110987654321 has 28 digits.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=IntegerLength[FromDigits[Flatten[IntegerDigits/@Join[Range[n], Reverse[Range[n-1]]]]]]; Array[a,63] (* Stefano Spezia, Apr 16 2025 *)
  • PARI
    a(n)={my(t=logint(n,10)+1); 2*n*t-2*(10^t-1)/9+t}
    
  • Python
    def a(n): return ((n*(t:=len(str(n)))-(10**t-1)//9)<<1) + t
    print([a(n) for n in range(1, 64)]) # Michael S. Branicky, May 02 2023

Formula

a(n) = A058183(n) + A058183(n-1), for n >= 2.
a(n) = A055642(A173426(n)).
a(n) = 2*A058183(n) - A055642(n).

A260853 Base-3 representation of a(n) is the concatenation of the base-3 representations of 1, 2, ..., n, n-1, ..., 1.

Original entry on oeis.org

0, 1, 16, 439, 35350, 2864599, 232046890, 18795930559, 1522471570630, 369960528437035, 269701223137448146, 196612191672080116867, 143330287729139571972130, 104487779754548024866115515, 76171591441065652665051372946, 55529090160536864641400481743827
Offset: 0

Views

Author

M. F. Hasler, Aug 01 2015

Keywords

Comments

The base 3 is listed in A260343, which means that a(3) = A260851(3) = 439 = 121021_3 is prime and therefore in A260852. See these sequences for more information.

Examples

			a(0) = 0 is the result of the empty sum corresponding to 0 digits.
a(2) = 16 = 121_3 is the concatenation of (1, 2, 1).
a(3) = 439 = 121021_3 is the concatenation of (1, 2, 10, 2, 1), where the middle "10" is the base-3 representation of 3.
		

Crossrefs

Base-3 variant of A173426 (base 10) and A173427 (base 2). See A260854 - A260866 for variants in other bases b = 4, ..., 16.

Programs

  • Mathematica
    Join[{0},Table[FromDigits[Join[Flatten[IntegerDigits[Range[n], 3]], Flatten[ Reverse[ Most[ IntegerDigits[Range[n],3]]]]],3],{n,20}]] (* Harvey P. Dale, Mar 11 2019 *)
  • PARI
    a(n,b=3)=sum(i=1,#n=concat(vector(n*2-1,k,digits(min(k,n*2-k),b))),n[i]*b^(#n-i))

A260343 Numbers n such that the base-n number formed by concatenating the base-n numbers 1 2 ... n-1 n n-1 ... 2 1 is prime.

Original entry on oeis.org

2, 3, 4, 6, 9, 10, 16, 40, 104, 8840
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2015

Keywords

Comments

n = 8840 only corresponds to a probable prime (with 69770 decimal digits).
The concatenation (in base n) of the base-n numbers 1 2 3 ... k-1 k k-1 ... 3 2 1 is a square for k
Sequence A260852 lists the actual primes, A260852(k) = A260851(a(k)). - M. F. Hasler, Aug 02 2015

Examples

			For n = 2 we get the binary number 1 10 1 = 1101 = 13 (in decimal).
For n = 10 we get (as David Broadhurst remarks) the "memorable" decimal prime 12345678910987654321.
For n = 16 the prime is the hexadecimal number 123456789abcdef10fedcba987654321.
		

Crossrefs

For n=2 see A173427, for n=10 see A173426.
For n=3 through n=16 see A260853 - A260866.

Programs

  • Mathematica
    Select[Range[2, 120], PrimeQ@ Total[Times @@@ Transpose[{(Function[p, Power[#, p]] /@ Reverse@ Delete[Range[0, 2 # - 1], # + 1]), Flatten@ {Range[#], Reverse@ Range[# - 1]}}]] &] (* Michael De Vlieger, Aug 02 2015 *)
    bnpQ[n_]:=PrimeQ[FromDigits[Flatten[Join[IntegerDigits[#,n]&/@Range[n], IntegerDigits[ #,n]&/@Reverse[Range[n-1]]]],n]]; Select[Range[2,110],bnpQ] (* Harvey P. Dale, Feb 26 2023 *)
  • PARI
    for(b=2,9e9,ispseudoprime(p=(1+b*c=(b^b-1)\(b-1))*(c-b+1)-1)&&print1(b", ")); \\ D. Broadhurst and M. F. Hasler, Aug 02 2015
  • Python
    from gmpy2 import is_prime
    def intbase(dlist,b=10): # convert list of digits in base b to integer
        y = 0
        for d in dlist:
            y = y*b + d
        return y
    A260343_list = [n for n in range(2,500) if is_prime(intbase(list(range(1,n))+[1,0]+list(range(n-1,0,-1)), n))] # Chai Wah Wu, Aug 01 2015
    
Showing 1-10 of 38 results. Next