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.

Previous Showing 51-60 of 223 results. Next

A048445 Take the first n numbers written in base 14, concatenate them, then convert from base 14 to base 10.

Original entry on oeis.org

1, 16, 227, 3182, 44553, 623748, 8732479, 122254714, 1711566005, 23961924080, 335466937131, 4696537119846, 65751519677857, 12887297856859986, 2525910379944557271, 495078434469133225132, 97035373155950112125889, 19018933138566221976674262, 3727710895158979507428155371
Offset: 1

Views

Author

Patrick De Geest, May 15 1999

Keywords

Examples

			a(14) = (1)(2)(3)(4)(5)(6)(7)(8)(9)(A)(B)(C)(D)(10) = 123456789ABCD10_14 = 12887297856859986.
		

Crossrefs

Cf. A014897.
Concatenation of first n numbers in other bases: 2: A047778, 3: A048435, 4: A048436, 5: A048437, 6: A048438, 7: A048439, 8: A048440, 9: A048441, 10: A007908, 11: A048442, 12: A048443, 13: A048444, 14: this sequence, 15: A048446, 16: A048447.

Programs

  • Magma
    [n eq 1 select 1 else Self(n-1)*14^(1+Ilog(14, n))+n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
  • Mathematica
    If[STARTPOINT==1, n={}, n=Flatten[IntegerDigits[Range[STARTPOINT-1], 14]]]; Table[AppendTo[n, IntegerDigits[w, 14]]; n=Flatten[n]; FromDigits[n, 14], {w, STARTPOINT, ENDPOINT}] (* Dylan Hamilton, Aug 11 2010 *)
    f[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 14], 14]; Array[f, 20] (* Vincenzo Librandi, Dec 30 2012 *)

A048446 Take the first n numbers written in base 15, concatenate them, then convert from base 15 to base 10.

Original entry on oeis.org

1, 17, 258, 3874, 58115, 871731, 13075972, 196139588, 2942093829, 44131407445, 661971111686, 9929566675302, 148943500129543, 2234152501943159, 502684312937210790, 113103970410872427766, 25448393342446296247367, 5725888502050416655657593, 1288324912961343747522958444
Offset: 1

Views

Author

Patrick De Geest, May 15 1999

Keywords

Examples

			a(14) = (1)(2)(3)(4)(5)(6)(7)(8)(9)(A)(B)(C)(D)(E) = 123456789ABCDE_15 = 2234152501943159.
		

Crossrefs

Cf. A014898.
Concatenation of first n numbers in other bases: 2: A047778, 3: A048435, 4: A048436, 5: A048437, 6: A048438, 7: A048439, 8: A048440, 9: A048441, 10: A007908, 11: A048442, 12: A048443, 13: A048444, 14: A048445, 15: this sequence, 16: A048447.

Programs

  • Magma
    [n eq 1 select 1 else Self(n-1) * 15^(1+Ilog(15, n)) + n: n in [1..20]]; // Vincenzo Librandi, Dec 30 2012
  • Mathematica
    If[STARTPOINT==1, n={}, n=Flatten[IntegerDigits[Range[STARTPOINT-1], 15]]]; Table[AppendTo[n, IntegerDigits[w, 15]]; n=Flatten[n]; FromDigits[n, 15], {w, STARTPOINT, ENDPOINT}] (* Dylan Hamilton, Aug 11 2010 *)
    f[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 15], 15]; Array[f, 20] (* Vincenzo Librandi, Dec 30 2012 *)

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

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 127, 2, 3, 2, 3, 2, 113, 2, 3, 2, 3, 2, 13, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 29, 2, 3, 2, 3, 2, 71, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 23, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 10386763, 2, 3, 2, 3, 2, 397, 2, 3, 2, 3, 2, 37907, 2, 3, 2, 3, 2, 73, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 37, 2, 3, 2
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Comments

Least prime factor of A007908(n). For 1 < n <= 5000, a(n) < A007908(n), but this should fail infinitely often (assuming standard heuristics). - Charles R Greathouse IV, Apr 10 2014
From Robert Israel, Aug 28 2015: (Start)
a(n) = 2 iff n is even.
a(n) = 3 iff n == 3 or 5 (mod 6).
a(n) = 5 iff n == 25 (mod 30). (End)

Examples

			a(5)= 3, 3 is the smallest prime divisor of 12345.
		

Crossrefs

Programs

  • Maple
    C:= 1: A[1]:= 1:
    for n from 2 to 100 do
    C:= C*10^(1+ilog10(n))+n;
    F:= map(t -> t[1],ifactors(C,'easy')[2]);
    if hastype(F,integer) then A[n]:= min(select(type,F,integer))
    else A[n]:= min(numtheory:-factorset(C))
    fi
    od:
    seq(A[n],n=1..100); # Robert Israel, Aug 28 2015
  • Mathematica
    a = {}; b = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, Length[w]}]; p = FromDigits[a]; AppendTo[b,First[First[FactorInteger[ p]]]], {n, 25}]; b (* Artur Jasinski, Apr 04 2008 *)
  • PARI
    lpf(n)=forprime(p=2,1e3,if(n%p==0,return(p))); factor(n)[1,1]
    print1(N=1);for(n=2,100,N=N*10^#Str(n)+n; print1(", "lpf(N))) \\ Charles R Greathouse IV, Apr 10 2014

Extensions

More terms from Sascha Kurz, Jan 03 2003

A138789 a(n) = number of distinct prime divisors of A104759(n).

Original entry on oeis.org

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

Views

Author

Artur Jasinski, Mar 30 2008

Keywords

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[lst = Join[lst, IntegerDigits[n]], {n, 1, 50}]; Table[Length[FactorInteger[FromDigits[Reverse[lst[[Range[1,n]]]]]]], {n, 1, Length[lst]}] (* Robert Price, Mar 24 2015 *)

Formula

a(n) = A001221(A104759(n)). - Michel Marcus, Jun 30 2024

Extensions

Entire sequence corrected by Robert Price, Mar 24 2015
More terms from Sean A. Irvine, Jul 21 2024

A138793 a(n) = concatenation of reversed digits of natural numbers from n down to 1.

Original entry on oeis.org

1, 21, 321, 4321, 54321, 654321, 7654321, 87654321, 987654321, 1987654321, 1101987654321, 211101987654321, 31211101987654321, 4131211101987654321, 514131211101987654321, 61514131211101987654321, 7161514131211101987654321
Offset: 1

Views

Author

Artur Jasinski, Mar 30 2008, Apr 04 2008

Keywords

Comments

Note that leading zeros are not omitted when writing down digits in reversed order. So 10 reversed becomes 01. - N. J. A. Sloane, Jan 23 2017

Crossrefs

Programs

  • Magma
    [Seqint(&cat[Reverse(Intseq(k)): k in [1..n]]): n in [1..16]]; // Bruno Berselli, May 27 2011
    
  • Maple
    read(transforms): A138793 := proc(n) return digrev(parse(cat($(1..n)))): end: seq(A138793(n),n=1..17); # Nathaniel Johnston, Jun 26 2011
  • 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}]; b (* Artur Jasinski, Mar 30 2008 *)
    lst = {}; Table[FromDigits[Reverse[lst = Join[lst, IntegerDigits[n]]]], {n, 1, 15}] (* Robert Price, Mar 22 2015 *)
  • PARI
    a(n) = my(s = ""); forstep (k=n,1,-1, sk = digits(k); forstep (j=#sk, 1, -1, s = concat(s, sk[j]))); eval(s); \\ Michel Marcus, Jan 28 2017

A083449 a(n) = A019566(n)/9, where A019566(n) = concat(n,...,1) - concat(1,...,n).

Original entry on oeis.org

0, 1, 22, 343, 4664, 58985, 713306, 8367627, 96021948, -150891621, -13731137410, -260644605199, 86159119727012, 19839246664059223, 3106259112208391434, 422859356777752723645, 53509280234443297055856, 6473262479112108841388067, 759559693477989774385720278
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 01 2003

Keywords

Comments

Are there any palindromes > 58985?
This sequence also gives the number of occurrences of any digit d > n (thus n < 9) in the list of all numbers from 1 to concatenation(1,...,n) = A007908(n) = A014824(n) = sum_{i=1..n} i*10^(n-i). See A277849, A061217, A277830 etc. - M. F. Hasler, Nov 01 2016, edited Nov 07 2020

Crossrefs

Cf. A061217.

Programs

  • Maple
    a:= n-> (parse(cat((n+1-i)$i=1..n))-parse(cat($1..n)))/9:
    seq(a(n), n=1..20);  # Alois P. Heinz, Nov 09 2020
  • Mathematica
    Array[(FromDigits@ Apply[Join, Reverse@ #] - FromDigits@ Apply[Join, #])/9 &@ Map[IntegerDigits, Range[#]] &, 19] (* Michael De Vlieger, Nov 12 2020 *)
  • PARI
    apply( {A083449(n)=A019566(n)\9}, [1..20]) \\ - M. F. Hasler, Nov 07 2020

Formula

For n < 10, a(n) = ceiling((9*n-11)*(10^n+1)/729). - M. F. Hasler, Nov 07 2020

Extensions

More terms from David Wasserman, Nov 09 2004

A138790 Numbers k such that A138793(k) is prime.

Original entry on oeis.org

61, 946
Offset: 1

Views

Author

Artur Jasinski, Mar 30 2008, Mar 31 2008

Keywords

Comments

There are no more primes for k <= 5000.
a(3) > 20000. - Robert Price, Mar 24 2015

Examples

			a(1) = 61 because the number 160695...654321 is prime.
		

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]]; If[PrimeQ[p], Print[n]; AppendTo[b, p]], {n, 1, 2000}]; b (* Artur Jasinski, Mar 30 2008 *)
    Select[Range[1, 1000], PrimeQ[lst = {}; Do[lst = Join[lst, IntegerDigits[n]], {n, 1, #}]; FromDigits[Reverse[lst]]] &] (* Robert Price, Mar 24 2015 *)

A262571 Concatenation of the numbers from 2 to n.

Original entry on oeis.org

2, 23, 234, 2345, 23456, 234567, 2345678, 23456789, 2345678910, 234567891011, 23456789101112, 2345678910111213, 234567891011121314, 23456789101112131415, 2345678910111213141516, 234567891011121314151617, 23456789101112131415161718, 2345678910111213141516171819
Offset: 2

Views

Author

N. J. A. Sloane, Sep 25 2015

Keywords

Crossrefs

For primes in this sequence see A089987.
See A262300 for more about this problem.

Programs

  • Magma
    [Seqint(Reverse(&cat[Reverse(Intseq(k)): k in [2..n]])): n in [2..20]]; // Vincenzo Librandi, Oct 29 2018
    
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits[Range[2, n]]]], {n, 2, 19}]  (* Robert Price, Oct 28 2018 *)
  • Python
    def a(n): return int("".join(map(str, range(2, n+1))))
    print([a(n) for n in range(2, 20)]) # Michael S. Branicky, Feb 23 2021

A262299 Let S(n) denote the sequence formed by concatenating the decimal numbers 1,2,3,..., omitting n; a(n) is the smallest prime in S(n), or -1 if no term in S(n) is prime.

Original entry on oeis.org

2, 13, 124567, 12356789, 123467891011, 123457, 123456891011
Offset: 1

Views

Author

N. J. A. Sloane and Jerrold B. Tunnell, Sep 25 2015

Keywords

Comments

A262300 is now the main entry for this question.

Examples

			a(8) = 1234567910111213...1873 (ending at 1873, a 6384-digit probable prime, and too large to display here) was found by _David Broadhurst_ on Sep 27 2015.
a(9) = 1234567810111213141516171819,
a(11) = 123456789101213,
and a(19) = 12345678910111213141516171820212223242526272829.
Sep 28, 2015: _David Broadhurst_ has also found a(10), a(12), a(14), a(16), a(17), a(18), and a(20). See A262300 for their values.
a(13) is at present unknown.
		

Crossrefs

A262300 gives the last term in S(n) when a prime appears for the first time.
See A262571-A262582 for the sequences S(1) through S(12).
Cf. A007908 (which plays the role of S(0)).
For the primes in S(1) and S(2) see A089987, A262298.

A035333 Concatenation of two or more consecutive positive integers.

Original entry on oeis.org

12, 23, 34, 45, 56, 67, 78, 89, 123, 234, 345, 456, 567, 678, 789, 910, 1011, 1112, 1213, 1234, 1314, 1415, 1516, 1617, 1718, 1819, 1920, 2021, 2122, 2223, 2324, 2345, 2425, 2526, 2627, 2728, 2829, 2930, 3031, 3132, 3233, 3334, 3435, 3456, 3536, 3637, 3738
Offset: 1

Views

Author

Keywords

Crossrefs

For concatenations of exactly k consecutive integers see A000027 (k=1), A127421 (k=2), A001703 (k=3), A279204 (k=4).
See also A007908 for concatenation of 1 through n.
For primes see A052087.
All of A007908, A052087, A053067, A279610 are subsequences.

Programs

  • Python
    import heapq
    from itertools import islice
    def agen():
        c = 12
        h = [(c, 1, 2)]
        nextcount = 3
        while True:
            (v, s, l) = heapq.heappop(h)
            yield v
            if v >= c:
                c = int(str(c) + str(nextcount))
                heapq.heappush(h, (c, 1, nextcount))
                nextcount += 1
            l += 1; v = int(str(v)[len(str(s)):] + str(l)); s += 1
            heapq.heappush(h, (v, s, l))
    print(list(islice(agen(), 47))) # Michael S. Branicky, Dec 23 2021

Extensions

Edited by Charles R Greathouse IV, Apr 28 2010
Corrected by Paul Tek, Jun 08 2013
Previous Showing 51-60 of 223 results. Next