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.

A341715 a(n) = smallest prime of the form n||n+1||n+2||...||n+k, where || denotes decimal concatenation, or -1 if no such prime exists.

Original entry on oeis.org

2, 3, 4567, 5, 67, 7, 89
Offset: 2

Views

Author

N. J. A. Sloane, Feb 21 2021

Keywords

Comments

a(1) is unknown, but is believed to exist (see A007908). The corresponding value of k, if it exists, is known to be at least 300000, so in any case this prime would be too large to include in an OEIS entry, which is why this sequence has offset 2.
a(9) = 9||10||...||187 (see Example section), but that is too large to show in the data field. a(A030457(n)) = A030457(n)||A030457(n)+1 and k = 1 for n > 1. If m is in A030470 but not in A030457, then a(m) = m||m+1||m+2||m+3 and k = 3. Of course a(p) = p and k = 0 for p prime. - Chai Wah Wu, Feb 22 2021
For the corresponding values of k and n+k, see A341716 and A341717.
See also A140793 = (23, 345...109, 4567, 567...17, ...), A341720, and A084559 for the variant with k >= 1, so that a(n) > n also for prime n. - M. F. Hasler, Feb 22 2021

Examples

			Starting at 12, 13, 14, 15, 17, 19, 20 we get the primes 1213, 13, 14151617, 1516171819, 17, 19, 20212223, which are all terms of this sequence.
Here is a(9) from _Chai Wah Wu_, Feb 22 2021, a 445-digit number:
910111213141516171819202122232425262728293031323334353637383940414243444546\
    47484950515253545556575859606162636465666768697071727374757677787980818\
    28384858687888990919293949596979899100101102103104105106107108109110111\
    11211311411511611711811912012112212312412512612712812913013113213313413\
    51361371381391401411421431441451461471481491501511521531541551561571581\
    59160161162163164165166167168169170171172173174175176177178179180181182\
    183184185186187
a(16) = 16||17||...||43 is prime. Also for a(10), I searched up to k <= 10000, so if it exists it will have tens of thousands of decimal digits. Some other big terms are: for n = 18, k = 3589; for n = 35, k = 568; for n = 66, k = 937; for n = 275, k = 814.  - _Chai Wah Wu_, Feb 22 2021
		

Crossrefs

If k in the definition is allowed to be zero we get [the present sequence, A341716, A341717], but if we require k>0 we get [A140793, A341720, A084559].
See A075022 for the largest prime factor of 1||2||...||n.

Programs

  • Mathematica
    Array[Block[{k = #, s = #}, While[! PrimeQ[s], k++; s = FromDigits[IntegerDigits[s]~Join~IntegerDigits[k]]]; s] &, 8, 2] (* Michael De Vlieger, Feb 22 2021 *)
  • PARI
    A341715(n)=if(isprime(n),n,eval(concat([Str(k)|k<-[n..A084559(n)]]))) \\ M. F. Hasler, Feb 22 2021
  • Python
    from sympy import isprime
    def A341715(n):
        m, k = n, n
        while not isprime(m):
            k += 1
            m = int(str(m)+str(k))
        return m # Chai Wah Wu, Feb 22 2021
    

Formula

a(n) = concatenate(n, ..., A084559(n)) or a(n) = n if n is prime. - M. F. Hasler, Feb 22 2021

A075021 a(1) = 1; for n>1, a(n) = the largest prime divisor of the number C(n) formed from the concatenation of n, n-1, n-2, n-3, ... down to 1.

Original entry on oeis.org

1, 7, 107, 149, 953, 218107, 402859, 4877, 379721, 54421, 370329218107, 5767189888301, 237927839, 1728836281, 136133374970881, 1190788477118549, 677181889, 399048049, 40617114482123, 629639170774346584751, 2605975408790409767, 65372140114441
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Examples

			a(4)= 149 as 149 is the largest prime divisor of 4321 =29*149
		

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w];Do[AppendTo[a, w[[Length[w] - k + 1]]], {k, 1, Length[w]}];p = FromDigits[Reverse[a]];AppendTo[b, First[Last[FactorInteger[p]]]], {n, 1, 21}]; b (* Artur Jasinski, Apr 04 2008 *)
    Table[FactorInteger[FromDigits[Flatten[IntegerDigits/@Range[n,1,-1]]]] [[-1,1]],{n,20}] (* Harvey P. Dale, Dec 14 2020 *)
  • PARI
    a(n) = if(n==1, 1, vecmax(factor(eval(concat(apply(k->Str(n-k+1), [1..n]))))[, 1])); \\ Daniel Suteu, May 26 2022

Formula

a(n) = A006530(A000422(n)). - Daniel Suteu, May 26 2022

Extensions

More terms from Sascha Kurz, Jan 03 2003
Name edited by Felix Fröhlich, May 26 2022

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

A138962 a(1) = 1, a(n) = the smallest prime divisor of A138793(n).

Original entry on oeis.org

1, 3, 3, 29, 3, 3, 19, 3, 3, 457, 3, 3, 16087, 3, 3, 35963, 3, 3, 167, 3, 3, 7, 3, 3, 13, 3, 3, 953, 3, 3, 7, 3, 3, 548636579, 3, 3, 19, 3, 3, 71, 3, 3, 13, 3, 3, 89, 3, 3, 114689, 3, 3, 17, 3, 3, 12037, 3, 3, 7, 3, 3
Offset: 1

Views

Author

Artur Jasinski, Apr 04 2008

Keywords

Comments

a(61) > 10^11. - Robert Price, Mar 22 2015

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, 1, Length[w]}]; p = FromDigits[Reverse[a]]; AppendTo[b, First[First[FactorInteger[p]]]], {n, 1, 31}]; b (* Artur Jasinski, Apr 04 2008 *)
    lst = {}; Table[First[First[FactorInteger[FromDigits[Reverse[lst = Join[lst,IntegerDigits[n]]]]]]], {n, 1, 60}] (* Robert Price, Mar 22 2015 *)
  • PARI
    f(n) = my(D = Vec(concat(apply(s->Str(s), [1..n])))); eval(concat(vector(#D, k, D[#D-k+1]))); \\ A138793
    a(n) = my(k=f(n)); forprime(p=2, 10^6, if(k%p == 0, return(p))); if(n == 1, 1, vecmin(factor(k)[,1])); \\ Daniel Suteu, May 27 2022

Formula

a(n) = A020639(A138793(n)). - Daniel Suteu, May 27 2022

Extensions

a(32)-a(60) from Robert Price, Mar 22 2015

A138794 a(n) = A138793(n+1)-A138793(n).

Original entry on oeis.org

20, 300, 4000, 50000, 600000, 7000000, 80000000, 900000000, 1000000000, 1100000000000, 210000000000000, 31000000000000000, 4100000000000000000, 510000000000000000000, 61000000000000000000000
Offset: 1

Views

Author

Artur Jasinski, Mar 30 2008

Keywords

Comments

First differences of A138793

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, 1, Length[w]}]; p = FromDigits[Reverse[a]]; AppendTo[b, p], {n, 1, 31}]; c = {}; Do[AppendTo[c, b[[n + 1]] - b[[n]]], {n, 1, Length[b] - 1}]; c (*Artur Jasinski*)

Formula

a(n) = A138793(n+1)-A138793(n)

A138963 a(1) = 1, a(n) = the largest prime divisor of A138793(n).

Original entry on oeis.org

1, 7, 107, 149, 953, 218107, 402859, 4877, 379721, 4349353, 169373, 182473, 1940144339383, 2184641, 437064932281, 5136696159619, 67580875919190833, 1156764458711, 464994193118899, 4617931439293, 1277512103328491957510030561, 8177269604099
Offset: 1

Views

Author

Artur Jasinski, Apr 04 2008

Keywords

Comments

For the smallest prime divisors of A138793 see A138962.

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, 1, Length[w]}]; p = FromDigits[Reverse[a]]; AppendTo[b, First[Last[FactorInteger[p]]]], {n, 1, 31}]; b (* Artur Jasinski, Apr 04 2008 *)
    lst = {}; Table[First[Last[FactorInteger[FromDigits[Reverse[lst = Join[lst,IntegerDigits[n]]]]]]], {n, 1, 10}] (* Robert Price, Mar 22 2015 *)
  • PARI
    f(n) = my(D = Vec(concat(apply(s->Str(s), [1..n])))); eval(concat(vector(#D, k, D[#D-k+1]))); \\ A138793
    a(n) = if(n == 1, 1, vecmax(factor(f(n))[,1])); \\ Daniel Suteu, May 26 2022

Formula

a(n) = A006530(A138793(n)). - Daniel Suteu, May 26 2022

A138795 a(n) = (A138793(n+1)-A138793(n))/10^n.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 1, 110, 2100, 31000, 410000, 5100000, 61000000, 710000000, 8100000000, 91000000000, 20000000000, 1200000000000, 22000000000000, 320000000000000, 4200000000000000, 52000000000000000, 620000000000000000
Offset: 1

Views

Author

Artur Jasinski, Mar 30 2008

Keywords

Comments

First differences of A138793 divided by 10^n

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, 1, Length[w]}]; p = FromDigits[Reverse[a]]; AppendTo[b, p], {n, 1, 61}]; c = {}; Do[AppendTo[c, (b[[n + 1]] - b[[n]])/(10^n)], {n, 1, Length[b] - 1}]; c (*Artur Jasinski*)

Formula

a(n) = A138793(n+1)-A138793(n)

A366954 The sum of the divisors of the concatenation of 1,2,3,...,n.

Original entry on oeis.org

1, 28, 168, 1854, 19776, 327152, 1244416, 27319968, 178422816, 22222222056, 2075415810048, 308768621226000, 12455031810211128, 2469135782022242640, 197530862561779410288, 21604938101329359719880, 1821571286217135606177024, 270250398197557076360997936
Offset: 1

Views

Author

Sean A. Irvine, Oct 29 2023

Keywords

Examples

			a(3)=168 because the divisors of 123 are {1, 3, 41, 123}.
		

Crossrefs

Formula

a(n) = sigma(A007908(n)) = A000203(A007908(n)).
Showing 1-9 of 9 results.