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

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

Original entry on oeis.org

1, 3, 41, 617, 823, 643, 9721, 14593, 3803, 1234567891, 630803, 2110805449, 869211457, 205761315168520219, 8230452606740808761, 1231026625769, 584538396786764503, 801309546900123763, 833929457045867563
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Examples

			a(4) = 617 since 1234 = 2*617.
		

Crossrefs

Programs

  • Mathematica
    a = {}; b = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, 1, Length[w]}]; p = FromDigits[a]; AppendTo[b, First[Last[FactorInteger[p]]]], {n, 1, 25}]; b (* Artur Jasinski, Apr 04 2008 *)
    Table[FactorInteger[FromDigits[Flatten[IntegerDigits/@Range[n]]]][[-1,1]],{n,20}] (* Harvey P. Dale, Aug 31 2015 *)

Extensions

More terms from Sascha Kurz, Jan 03 2003

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)
Showing 1-7 of 7 results.