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 29 results. Next

A165145 Partial sums of A058183.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 36, 45, 56, 69, 84, 101, 120, 141, 164, 189, 216, 245, 276, 309, 344, 381, 420, 461, 504, 549, 596, 645, 696, 749, 804, 861, 920, 981, 1044, 1109, 1176, 1245, 1316, 1389, 1464, 1541, 1620, 1701, 1784, 1869, 1956, 2045, 2136, 2229, 2324, 2421
Offset: 1

Views

Author

Zhining Yang, Sep 05 2009

Keywords

Comments

Number of digits of the concatenated first n entries of A007908.

Examples

			Example: The 4th number is 10, because the number of digits in the concatenation 1121231234 is 10.
		

Programs

  • Mathematica
    t=Table[n*(n+1)/2,{n,53}];q=9;Add12[l_]:=Table[l[[n+q]]+l[[n]],{n,Length[l]-q}];Join[Take[t,9],Add12[t]] (* Vladimir Joseph Stephan Orlovsky, Feb 01 2012 *)

Extensions

Edited and extended by R. J. Mathar, Sep 06 2009

A016777 a(n) = 3*n + 1.

Original entry on oeis.org

1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154, 157, 160, 163, 166, 169, 172, 175, 178, 181, 184, 187
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1996

Keywords

Comments

Numbers k such that the concatenation of the first k natural numbers is not divisible by 3. E.g., 16 is in the sequence because we have 123456789101111213141516 == 1 (mod 3).
Ignoring the first term, this sequence represents the number of bonds in a hydrocarbon: a(#of carbon atoms) = number of bonds. - Nathan Savir (thoobik(AT)yahoo.com), Jul 03 2003
n such that Sum_{k=0..n} (binomial(n+k,n-k) mod 2) is even (cf. A007306). - Benoit Cloitre, May 09 2004
Hilbert series for twisted cubic curve. - Paul Barry, Aug 11 2006
If Y is a 3-subset of an n-set X then, for n >= 3, a(n-3) is the number of 3-subsets of X having at least two elements in common with Y. - Milan Janjic, Nov 23 2007
a(n) = A144390 (1, 9, 23, 43, 69, ...) - A045944 (0, 5, 16, 33, 56, ...). From successive spectra of hydrogen atom. - Paul Curtz, Oct 05 2008
Number of monomials in the n-th power of polynomial x^3+x^2+x+1. - Artur Jasinski, Oct 06 2008
A145389(a(n)) = 1. - Reinhard Zumkeller, Oct 10 2008
Union of A035504, A165333 and A165336. - Reinhard Zumkeller, Sep 17 2009
Hankel transform of A076025. - Paul Barry, Sep 23 2009
From Jaroslav Krizek, May 28 2010: (Start)
a(n) = numbers k such that the antiharmonic mean of the first k positive integers is an integer.
A169609(a(n-1)) = 1. See A146535 and A169609. Complement of A007494.
See A005408 (odd positive integers) for corresponding values A146535(a(n)). (End)
Apart from the initial term, A180080 is a subsequence; cf. A180076. - Reinhard Zumkeller, Aug 14 2010
Also the maximum number of triangles that n + 2 noncoplanar points can determine in 3D space. - Carmine Suriano, Oct 08 2010
A089911(4*a(n)) = 3. - Reinhard Zumkeller, Jul 05 2013
The number of partitions of 6*n into at most 2 parts. - Colin Barker, Mar 31 2015
For n >= 1, a(n)/2 is the proportion of oxygen for the stoichiometric combustion reaction of hydrocarbon CnH2n+2, e.g., one part propane (C3H8) requires 5 parts oxygen to complete its combustion. - Kival Ngaokrajang, Jul 21 2015
Exponents n > 0 for which 1 + x^2 + x^n is reducible. - Ron Knott, Oct 13 2016
Also the number of independent vertex sets in the n-cocktail party graph. - Eric W. Weisstein, Sep 21 2017
Also the number of (not necessarily maximal) cliques in the n-ladder rung graph. - Eric W. Weisstein, Nov 29 2017
Also the number of maximal and maximum cliques in the n-book graph. - Eric W. Weisstein, Dec 01 2017
For n>=1, a(n) is the size of any snake-polyomino with n cells. - Christian Barrientos and Sarah Minion, Feb 27 2018
The sum of two distinct terms of this sequence is never a square. See Lagarias et al. p. 167. - Michel Marcus, May 20 2018
It seems that, for any n >= 1, there exists no positive integer z such that digit_sum(a(n)*z) = digit_sum(a(n)+z). - Max Lacoma, Sep 18 2019
For n > 2, a(n-2) is the number of distinct values of the magic constant in a normal magic triangle of order n (see formula 5 in Trotter). - Stefano Spezia, Feb 18 2021
Number of 3-permutations of n elements avoiding the patterns 132, 231, 312. See Bonichon and Sun. - Michel Marcus, Aug 20 2022
Erdős & Sárközy conjecture that a set of n positive integers with property P must have some element at least a(n-1) = 3n - 2. Property P states that, for x, y, and z in the set and z < x, y, z does not divide x+y. An example of such a set is {2n-1, 2n, ..., 3n-2}. Bedert proves this for large enough n. (This is an upper bound, and is exact for all known n; I have verified it for n up to 12.) - Charles R Greathouse IV, Feb 06 2023
a(n-1) = 3*n-2 is the dimension of the vector space of all n X n tridiagonal matrices, equals the number of nonzero coefficients: n + 2*(n-1) (see Wikipedia link). - Bernard Schott, Mar 03 2023

Examples

			G.f. = 1 + 4*x + 7*x^2 + 10*x^3 + 13*x^4 + 16*x^5 + 19*x^6 + 22*x^7 + ... - _Michael Somos_, May 27 2019
		

References

  • W. Decker, C. Lossen, Computing in Algebraic Geometry, Springer, 2006, p. 22.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.1 Terminology, p. 264.
  • Konrad Knopp, Theory and Application of Infinite Series, Dover, p. 269.

Crossrefs

Cf. A007559 (partial products), A051536 (lcm).
First differences of A000326.
Row sums of A131033.
Complement of A007494. - Reinhard Zumkeller, Oct 10 2008
Some subsequences: A002476 (primes), A291745 (nonprimes), A135556 (squares), A016779 (cubes).

Programs

  • Haskell
    a016777 = (+ 1) . (* 3)
    a016777_list = [1, 4 ..]  -- Reinhard Zumkeller, Feb 28 2013, Feb 10 2012
    
  • Magma
    [3*n+1 : n in [1..70]]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Mathematica
    Range[1, 199, 3] (* Vladimir Joseph Stephan Orlovsky, May 26 2011 *)
    (* Start from Eric W. Weisstein, Sep 21 2017 *)
    3 Range[0, 70] + 1
    Table[3 n + 1, {n, 0, 70}]
    LinearRecurrence[{2, -1}, {1, 4}, 70]
    CoefficientList[Series[(1 + 2 x)/(-1 + x)^2, {x, 0, 70}], x]
    (* End *)
  • Maxima
    A016777(n):=3*n+1$
    makelist(A016777(n),n,0,30); /* Martin Ettl, Oct 31 2012 */
    
  • PARI
    a(n)=3*n+1 \\ Charles R Greathouse IV, Jul 28 2015
    
  • SageMath
    [3*n+1 for n in range(1,71)] # G. C. Greubel, Mar 15 2024

Formula

G.f.: (1+2*x)/(1-x)^2.
a(n) = A016789(n) - 1.
a(n) = 3 + a(n-1).
Sum_{n>=1} (-1)^n/a(n) = (1/3)*(Pi/sqrt(3) + log(2)). [Jolley, p. 16, (79)] - Benoit Cloitre, Apr 05 2002
(1 + 4*x + 7*x^2 + 10*x^3 + ...) = (1 + 2*x + 3*x^2 + ...)/(1 - 2*x + 4*x^2 - 8*x^3 + ...). - Gary W. Adamson, Jul 03 2003
E.g.f.: exp(x)*(1+3*x). - Paul Barry, Jul 23 2003
a(n) = 2*a(n-1) - a(n-2); a(0)=1, a(1)=4. - Philippe Deléham, Nov 03 2008
a(n) = 6*n - a(n-1) - 1 (with a(0) = 1). - Vincenzo Librandi, Nov 20 2010
Sum_{n>=0} 1/a(n)^2 = A214550. - R. J. Mathar, Jul 21 2012
a(n) = A238731(n+1,n) = (-1)^n*Sum_{k = 0..n} A238731(n,k)*(-5)^k. - Philippe Deléham, Mar 05 2014
Sum_{i=0..n} (a(i)-i) = A000290(n+1). - Ivan N. Ianakiev, Sep 24 2014
From Wolfdieter Lang, Mar 09 2018: (Start)
a(n) = denominator(Sum_{k=0..n-1} 1/(a(k)*a(k+1))), with the numerator n = A001477(n), where the sum is set to 0 for n = 0. [Jolley, p. 38, (208)]
G.f. for {n/(1 + 3*n)}_{n >= 0} is (1/3)*(1-hypergeom([1, 1], [4/3], -x/(1-x)))/(1-x). (End)
a(n) = -A016789(-1-n) for all n in Z. - Michael Somos, May 27 2019

Extensions

Better description from T. D. Noe, Aug 15 2002
Partially edited by Joerg Arndt, Mar 11 2010

A007908 Triangle of the gods: to get a(n), concatenate the decimal numbers 1,2,3,...,n.

Original entry on oeis.org

1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891011, 123456789101112, 12345678910111213, 1234567891011121314, 123456789101112131415, 12345678910111213141516, 1234567891011121314151617, 123456789101112131415161718
Offset: 1

Views

Author

R. Muller

Keywords

Comments

For the name "triangle of the gods" see Pickover link. - N. J. A. Sloane, Dec 15 2019
Number of digits: A058183(n) = A055642(a(n)); sums of digits: A037123(n) = A007953(a(n)). - Reinhard Zumkeller, Aug 10 2010
Charles Nicol and John Selfridge ask if there are infinitely many primes in this sequence - see the Guy reference. - Charles R Greathouse IV, Dec 14 2011
Stephan finds no primes in the first 839 terms. I checked that there are no primes in the first 5000 terms. Heuristically there are infinitely many, about 0.5 log log n through the n-th term. - Charles R Greathouse IV, Sep 19 2012 [Expanded search to 20000 without finding any primes. - Charles R Greathouse IV, Apr 17 2014] [Independent search extended to 64000 terms without finding any primes. - Dana Jacobsen, Apr 25 2014]
Elementary congruence arguments show that primes can occur only at indices congruent to 1, 7, 13, or 19 mod 30. - Roderick MacPhee, Oct 05 2015
A note on heuristics: I wrote a quick program to count primes in sequences which are like A007908 but start at k instead of 1. I ran this for k = 1 to 100 and counted the primes up to 1000 (1000 possibilities for k = 1, 999 for k = 2, etc. up to 901 for k = 100). I then compared this to the expected count which is 0 if the number N is divisible by 2, 3, or 5 and 15/(4 log N) otherwise. (If N < 43 I counted the number as 1 instead.) k = 1 has 1.788 expected primes but only 0 actual (of course). k = 2 has 2.268 expected but 4 actual (see A262571, A089987). In total the expectation is 111.07 and the actual count is 110, well within the expected error of +/- 10.5. - Charles R Greathouse IV, Sep 28 2015
Early bird numbers for n > 1: a(2) = A116700(1) = 12; a(3) = A116700(52) = 123; a(4) = A116700(725) = 1234; a(5) = A116700(8074) = 12345; a(6) = A116700(85846) = 123456. - Reinhard Zumkeller, Dec 13 2012
For n < 10^6, a(n)/A000217(n) is an integer for n = 1, 2, and 5. The integers are 1, 4, and 823 (a prime), respectively. - Derek Orr, Sep 04 2014; Max Alekseyev, Sep 30 2015
In order to be a prime, a(n) must end in a digit 1, 3, 7 or 9, so only 4 among 10 consecutive values can be prime. (But a(64000) already has A058183(64000) > 300000 digits.) Also, a(64001) and a(64011) and more generally a(64001+10k) is divisible by 3 unless k == 2 (mod 3), but for k = 2, 5, 8, ... 23 these are divisible by small primes < 999. a(64261) is the first serious candidate in this subsequence. - M. F. Hasler, Sep 30 2015
There are no primes in the first 10^5 terms. - Max Alekseyev, Oct 03 2015; Oct 11 2015
There are no primes in the first 200000 terms. - Serge Batalov, Oct 24 2015
There is a distributed project for continued search, using PRPNet/PFGW software; see the Mersenne Forum link below. - Serge Batalov, Oct 18 2015
It appears that the Mersenne Forum search reached n = 344869 without finding a prime, and was then abandoned. It would be nice if someone could recover the final version of that link from the Wayback machine - the Great Smarandache PRPrime search, http://99.121.249.54:1200 - so that we have a record of how far they searched. - N. J. A. Sloane, Apr 09 2018
The web page https://www.mersenneforum.org/showthread.php?t=20527&page=9 has a comment from Serge Balatov that seems to say that the search reached 10^6 without finding a prime. It would be nice to have this confirmed, and to get more details about how it was done. - N. J. A. Sloane, Dec 15 2019
The expected number of primes among the first million terms is about 0.6. - Ernst W. Mayer, Oct 09 2015
A few semiprimes exist among the early terms, but then become scarce: see A046461. For the base-2 analog of this sequence (A047778), there is a 15-decimal digit prime, but Hans Havermann has shown that the second prime would have more than 91000 digits. - N. J. A. Sloane, Oct 08 2015

References

  • R. K. Guy, Unsolved Problems in Number Theory, Section A3, page 15, of 3rd edition, Springer, 2010.

Crossrefs

See A057137 for another version.
Cf. A033307, A053064, A000422 (left concatenations)
If we concatenate 1 through n but leave out k, we get sequences A262571 (leave out 1) through A262582 (leave out 12), etc., and again we can ask for the smallest prime in each sequence. See A262300 for a summary of these results. Primes seem to exist if we search far enough. - N. J. A. Sloane, Sep 29 2015
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: this sequence, 11: A048442, 12: A048443, 13: A048444, 14: A048445, 15: A048446, 16: A048447. - Dylan Hamilton, Aug 11 2010
Entries that give the primes in sequences of this type: A089987, A262298, A262300, A262552, A262555.
For semiprimes see A046461.
See also A007376 (the almost-natural numbers), A071620 (primes in that sequence).
See also A033307 (the Champernowne constant) and A176942 (the Champernowne primes). A262043 is a variant of the present sequence.
A002782 is an amusing cousin of this sequence.
Least prime factor: A075019.

Programs

  • Haskell
    a007908 = read . concatMap show . enumFromTo 1 :: Integer -> Integer
    -- Reinhard Zumkeller, Dec 13 2012
    
  • Magma
    [Seqint(Reverse(&cat[Reverse(Intseq(k)): k in [1..n]])): n in [1..17]];  // Bruno Berselli, May 27 2011
    
  • Maple
    A055642 := proc(n) max(1, ilog10(n)+1) ; end: A007908 := proc(n) if n = 1 then 1; else A007908(n-1)*10^A055642(n)+n ; fi ; end: seq(A007908(n),n=1..12) ; # R. J. Mathar, May 31 2008
    # second Maple program:
    a:= proc(n) a(n):= `if`(n=0, 0, parse(cat(a(n-1), n))) end:
    seq(a(n), n=1..22);  # Alois P. Heinz, Jan 12 2021
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits[Range[n]]]], {n, 20}] (* Alonso del Arte, Sep 19 2012 *)
    FoldList[#2 + #1 10^IntegerLength[#2] &, Range[20]] (* Eric W. Weisstein, Nov 06 2015 *)
    FromDigits /@ Flatten /@ IntegerDigits /@ Flatten /@ Rest[FoldList[List, {}, Range[20]]] (* Eric W. Weisstein, Nov 04 2015 *)
    FromDigits /@ Flatten /@ IntegerDigits /@ Rest[FoldList[Append, {}, Range[20]]] (* Eric W. Weisstein, Nov 04 2015 *)
  • Maxima
    a[1]:1$ a[n]:=a[n-1]*10^floor(log(10*n)/log(10))+n$ makelist(a[n],n,1,17);  /* Bruno Berselli, May 27 2011 */
    
  • PARI
    a(n)=my(s="");for(k=1,n,s=Str(s,k));eval(s) \\ Charles R Greathouse IV, Sep 19 2012
    
  • PARI
    A007908(n,a=0)={for(d=1,#Str(n),my(t=10^d);for(k=t\10,min(t-1,n),a=a*t+k));a} \\ M. F. Hasler, Sep 30 2015
    
  • Python
    def a(n): return int("".join(map(str, range(1, n+1))))
    print([a(n) for n in range(1, 18)]) # Michael S. Branicky, Jan 12 2021
    
  • Python
    from functools import reduce
    def A007908(n): return reduce(lambda i,j:i*10**len(str(j))+j,range(1,n+1)) # Chai Wah Wu, Feb 27 2023

Formula

a(n) = n + a(n-1)*10^A055642(n). - R. J. Mathar, May 31 2008
a(n) = floor(C*10^(A058183(n))) with C = A033307. - José de Jesús Camacho Medina, Aug 19 2015

Extensions

Name edited by N. J. A. Sloane, Dec 15 2019

A007376 The almost-natural numbers: write n in base 10 and juxtapose digits.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also called the Barbier infinite word.
This is an example of a non-morphic sequence.
a(n) = A162711(n,1); A136414(n) = 10*a(n) + a(n+1). - Reinhard Zumkeller, Jul 11 2009
a(A031287(n)) = 0, a(A031288(n)) = 1, a(A031289(n)) = 2, a(A031290(n)) = 3, a(A031291(n)) = 4, a(A031292(n)) = 5, a(A031293(n)) = 6, a(A031294(n)) = 7, a(A031295(n)) = 8, a(A031296(n)) = 9. - Reinhard Zumkeller, Jul 28 2011
May be regarded as an irregular table in which the n-th row lists the digits of n. - Jason Kimberley, Dec 07 2012
The digits of the integer n start at index A117804(n). The digit a(n) at index n belongs to the number A100470(n). - M. F. Hasler, Oct 23 2019
See also the Copeland-Erdős constant A033308, equivalent using primes instead of all numbers. - M. F. Hasler, Oct 24 2019
Decimal expansion of Sum_{k>=1} k/10^(A058183(k) + 1). - Stefano Spezia, Nov 30 2022

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, pp. 114, 336.
  • R. Honsberger, Mathematical Chestnuts from Around the World, MAA, 2001; see p. 163.
  • M. Kraitchik, Mathematical Recreations. Dover, NY, 2nd ed., 1953, p. 49.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987, p. 26.

Crossrefs

Considered as a sequence of digits, this is the same as the decimal expansion of the Champernowne constant, A033307. See that entry for a formula for a(n), further references, etc.
Cf. A054632 (partial sums), A023103.
Cf. A193428, A256100, A001477 (the nonnegative integers), A117804, A100470.
Tables in which the n-th row lists the base b digits of n: A030190 and A030302 (b=2), A003137 and A054635 (b=3), A030373 (b=4), A031219 (b=5), A030548 (b=6), A030998 (b=7), A031035 and A054634 (b=8), A031076 (b=9), this sequence and A033307 (b=10). - Jason Kimberley, Dec 06 2012
Row lengths in A055642.
For primes here see A071620. See A007908 for a very similar sequence.

Programs

  • Haskell
    a007376 n = a007376_list !! (n-1)
    a007376_list = concatMap (map (read . return) . show) [0..] :: [Int]
    -- Reinhard Zumkeller, Nov 11 2013, Dec 17 2011, Mar 28 2011
    
  • Magma
    &cat[Reverse(IntegerToSequence(n)):n in[0..31]]; // Jason Kimberley, Dec 07 2012
    
  • Maple
    c:=proc(x,y) local s: s:=proc(m) nops(convert(m,base,10)) end: if y=0 then 10*x else x*10^s(y)+y: fi end: b:=proc(n) local nn: nn:=convert(n,base,10):[seq(nn[nops(nn)+1-i],i=1..nops(nn))] end: A:=0: for n from 1 to 75 do A:=c(A,n) od: b(A); # c concatenates 2 numbers while b converts a number to the sequence of its digits - Emeric Deutsch, Jul 27 2006
    #alternative
    A007376 := proc(n) option remember ; local aprev, dOld,N ; if n <=9 then RETURN([n,n,1]) ; else aprev := A007376(n-1) ; dOld := op(3,aprev) ; N := op(2,aprev) ; if dOld < A055642(N) then RETURN([op(-dOld-1,convert(N,base,10)),N,dOld+1]) ; else RETURN([op(-1,convert(N+1,base,10)),N+1,1]) ; fi ; fi ; end: # R. J. Mathar, Jan 21 2008
  • Mathematica
    Flatten[ IntegerDigits /@ Range@ 57] (* Or *)
    almostNatural[n_, b_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; Array[ almostNatural[#, 10] &, 105] (* updated Jun 29 2014 *)
    With[{nn=120},RealDigits[N[ChampernowneNumber[],nn],10,nn]][[1]] (* Harvey P. Dale, Mar 13 2018 *)
  • PARI
    for(n=0,90,v=digits(n);for(i=1,#v,print1(v[i]", "))) \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    apply( A007376(n)={for(k=1,n, k*10^k>n&& return(digits(n\k)[n%k+1]); n+=10^k)}, [0..200]) \\ M. F. Hasler, Nov 03 2019
    
  • Python
    A007376_list = [int(d) for n in range(10**2) for d in str(n)] # Chai Wah Wu, Feb 04 2015

Extensions

Extended to a(0) = 0 by M. F. Hasler, Oct 23 2019

A000422 Concatenation of numbers from n down to 1.

Original entry on oeis.org

1, 21, 321, 4321, 54321, 654321, 7654321, 87654321, 987654321, 10987654321, 1110987654321, 121110987654321, 13121110987654321, 1413121110987654321, 151413121110987654321, 16151413121110987654321, 1716151413121110987654321, 181716151413121110987654321
Offset: 1

Views

Author

R. Muller

Keywords

Comments

The first prime term in this sequence is a(82) (see A176024). - Artur Jasinski, Mar 30 2008
For n < 10^4, a(n)/A000217(n) is an integer for n = 1, 2, and 18. The integers are 1, 7 (prime), and 1062667552123515268933651, respectively. - Derek Orr, Sep 04 2014

References

  • F. Smarandache, "Properties of the Numbers", University of Craiova Archives, 1975; Arizona State University Special Collections, Tempe, AZ

Crossrefs

Programs

  • Maple
    a[1]:= 1:
    for n from 2 to 100 do
    a[n]:= n*10^(1+ilog10(a[n-1])) + a[n-1]
    od:
    seq(a[n],n=1..100); # Robert Israel, Sep 05 2014
    # second Maple program:
    a:= proc(n) a(n):= `if`(n=1, 1, parse(cat(n, a(n-1)))) end:
    seq(a(n), n=1..22);  # Alois P. Heinz, Jan 12 2021
  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[PrependTo[a, w[[Length[w] - k + 1]]], {k, 1, Length[w]}]; p = FromDigits[a]; AppendTo[b, p], {n, 1, 30}]; b (* Artur Jasinski, Mar 30 2008 *)
    Table[FromDigits[Flatten[IntegerDigits/@Range[n,1,-1]]],{n,20}] (* Harvey P. Dale, Jul 06 2019 *)
  • PARI
    a(n)=my(t=n);forstep(k=n-1,1,-1,t=t*10^#Str(k)+k);t \\ Charles R Greathouse IV, Jul 15 2011
    
  • PARI
    A000422(n,p=1,L=1)=sum(k=1,n,k*p*=L+(k==L&&!L*=10)) \\ M. F. Hasler, Nov 02 2016
    
  • Python
    def a(n): return int("".join(map(str, range(n, 0, -1))))
    print([a(n) for n in range(1, 19)]) # Michael S. Branicky, Dec 08 2021

Formula

a(n+1) = (n+1)*10^len(a(n)) + a(n), where len(k) = number of digits in k.
a(n) = Sum_{k=1..n} k*10^(A058183(k) - (1+floor(log10(k)))). - Alexander Goebel, Mar 07 2020
From Serge Batalov, Dec 08 2021: (Start)
a(n) = ((n*9-1)*10^n+1)/9^2 for n < 10,
a(n) = ((n*99-1)*10^(2*n-19)-89)/99^2*10^10 + (8*10^10+1)/9^2 for 10 <= n < 100,
a(n) = ((n*999-1)*10^(3*n-299)-989)/999^2*10^191 + c2 for 10^2 <= n < 10^3,
a(n) = ((n*9999-1)*10^(4*n-3999)-9989)/9999^2*10^2892 + c3 for 10^3 <= n < 10^4,
a(n) = ((n*99999-1)*10^(5*n-49999)-99989)/99999^2*10^38893 + c4 for 10^4 <= n < 10^5,
a(n) = ((n*999999-1)*10^(6*n-599999)-999989)/999999^2*10^488894 + c5 for 10^5 <= n < 10^6,
where
c2 = (98*10^191 + 879*10^10 + 121)/99^2 = a(99),
c3 = (998*10^2701 - 989)/999^2*10^191 + c2 = a(999),
c4 = (9998*10^36001 - 9989)/9999^2*10^2892 + c3 = a(9999),
c5 = (99998*10^450001 - 99989)/99999^2*10^38893 + c4 = a(99999).
(End)

Extensions

Edited by N. J. A. Sloane, Dec 03 2021

A117804 Natural position of n in the string 12345678910111213....

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120
Offset: 1

Views

Author

Warut Roonguthai, Jul 23 2007

Keywords

Comments

The number of digits necessary to write down all the numbers 0, 1, 2, ..., n-1. Thus, the partial sums of A055642 are given by a(n+1). - Hieronymus Fischer, Jun 08 2012
From Daniel Forgues, Mar 21 2013: (Start)
From n = 10^0 + 1 to 10^1: a(n) - a(n-1) = 1 (9 * 10^0 terms);
From n = 10^1 + 1 to 10^2: a(n) - a(n-1) = 2 (9 * 10^1 terms);
From n = 10^2 + 1 to 10^3: a(n) - a(n-1) = 3 (9 * 10^2 terms);
...
From n = 10^k + 1 to 10^(k+1): a(n) - a(n-1) = k+1 (9 * 10^k terms). (End)
By the "number of digits" definition, a(n) = 1 + A058183(n-1) for n > 1. - David Fifield, Jun 02 2019

Examples

			12 begins at the 14th place in 12345678910111213... (we are ignoring "early bird" occurrences here, cf. A116700), so a(12) = 14.
From _Daniel Forgues_, Mar 21 2013: (Start)
a(10^1) = 10. (1*10^1 - 0)
a(10^2) = 190. (2*10^2 - 10)
a(10^3) = 2890. (3*10^3 - 110)
a(10^4) = 38890. (4*10^4 - 1110)
a(10^5) = 488890. (5*10^5 - 11110)
a(10^6) = 5888890. (6*10^6 - 111110)
...
a(10^k) = k*10^k - R_k + 1, R_k := k-th repunit (cf. A002275)
(the number of digits necessary to write down the numbers 0..10^k-1). (End)
		

Crossrefs

Formula

a(n) = d*n + 1 - (10^d - 1)/9 where d is the number of decimal digits in n, i.e., d = floor(log_10(n)) + 1.
From Hieronymus Fischer, Jun 08 2012: (Start)
a(n) = Sum_{j=0..n-1} A055642(j).
a(n) = 1 + A055642(n-1)*n - (10^A055642(n-1)-1)/9.
a(n) = 1 + A055642(n)*n - (10^A055642(n)-1)/9.
a(10^n) = (9*n-1)*(10^n-1)/9 + n + 1. (This is the total number of digits necessary to write down all the numbers with <= n places.)
G.f.: g(x) = x/(1-x) + (x/(1-x)^2)*Sum_{j>=0} x^10^j; corrected by Ilya Gutkovskiy, Jan 09 2017 (End)

A332580 a(n) = minimal positive k such that the concatenation of the decimal digits of n,n+1,...,n+k is divisible by n+k+1, or -1 if no such k exists.

Original entry on oeis.org

1, 80, 1885, 6838, 1, 44, 13, 2, 1311, 18, 197, 20, 53, 134, 993, 44, 175, 124518, 263, 26, 107, 10, 5, 62, 15, 33172, 9, 14, 317, 708, 1501, 214, 37, 34, 67, 270, 19, 20188, 78277, 10738, 287, 2390, 695, 2783191412912, 3, 700, 8303, 350, 21, 100, 2249, 21326
Offset: 1

Views

Author

Keywords

Comments

Certainly n+k must be even, since no odd number can be divisible by an even number.
The values of n+k = n+a(n) are given in the companion sequence A332584.
A heuristic argument suggests that k should always exist.
As of Jul 10 2020, up to n = 1000 there are just two unknown values, a(158) and a(539).
The following remarks summarize program made during the first half of 2020.
On Feb 19 2020 Joseph Myers discovered that a(98) = 259110640. On Feb 20 2020 he reported that a(44) > 10^11 if it exists; a(92), a(158) and a(170) are all > 10^10 if they exist; a(494), a(539), a(563), a(761), a(854), a(944) and a(956) are all > 2*10^9 if they exist; and that he has found all the other values up to a(1000). - N. J. A. Sloane, Feb 23 2020.
Added Feb 26 2020: Joseph Myers has now checked all the numbers up to 1000 out to a limit of 10^11 (see link).
Update from Paul Zimmermann, Mar 17 2020: (Start)
I started a parallel program using the same algorithm as in Joseph Myers's "grow.c" program on the few sequences with unknown status in http://oeis.org/A332580/a332580_2.txt.
This program just found:
pzimmermann@wurst:~/A332580$ tail 956.out
n=956 kmax=200000000000
found k=162236437060
It thus seems that a(956) = 162236437060, i.e., the term of index n+k+1 is divisible by 162236438017 = 43 * 5051 * 746969. (End)
Partial confirmation from Scott R. Shannon, Mar 17 2020: I set n = 956 and a k value a few less than 162236437060 in my Java version of Joseph Myer's program, and it found the results Paul Zimmermann gave. But that’s not much of a confirmation as it uses the same algorithm, just implemented in a different language.
Partial confirmation from Pierrick Gaudry, Mar 18 2020: (Start)
I ran the attached small C program in order to check that a(956) = 162236437060. More precisely, I check only that the 162236437060-th integer obtained starting with 956 is indeed 0 modulo 162236438017.
For this there is no need to rely on multi-precision arithmetic. However, since 162236438017 > 2^32, it is not possible to use 64-bit arithmetic; or at least, it was easier to use the 128-bit arithmetic provided by the compiler.
The algorithm is then fairly simple: just compute iteratively the big number obtained by concatenating 956, 957, 958, ... and so on, and reduce all along the way modulo 162236438017. The result should be zero. This was tested on a few other known example.
After a bit more than 1 hour on my laptop, this indeed prints 0, thus confirming that a(956) <= 162236437060 (this simple method does not check if there is a smaller value). (End)
Full confirmation for a(956) from Joseph Myers, Mar 18 2020: I restarted computations for 956 where I had stopped them before (at 101 * 10^9) and ran them up to 163 * 10^9; I also get 162236437060.
Update from Paul Zimmermann, Mar 22 2020: (Start)
Here are four more values to check, confirmed independently by Pierrick Gaudry:
a(44) <= 2783191412912
a(92) <= 218128159460
a(494) <= 2314160375788
a(854) <= 440578095296 (also k=587470935254 divides)
All four values were found with the "sieving" algorithm I described in an earlier email (see the Alekseyev et al. paper), sieving all primes up to 5000000000. Thus it is possible that smaller solutions exist.
Up to n=1000, the remaining cases where we have no bound at present are 158, 539, 761, 944. (End)
a(761) <= 111508066823971. Now only 3 values remain up to n=1000 (158, 539, 944). Paul Zimmermann, Mar 23 2020
I restarted my exhaustive search for 92 where I had previously stopped it, and can confirm a(92) = 218128159460. - Joseph Myers, Mar 23 2020
The remaining values to check are:
a(44) <= 2783191412912, a(494) <= 2314160375788, a(761) <= 111508066823971, a(854) <= 440578095296. - Paul Zimmermann, Mar 24 2020
a(854) = 440578095296 confirmed by Joseph Myers on Mar 26 2020.
Summary: As of Apr 15 2020, a(n) is known for all n <= 1000 except for four values where we have only an upper bound (44, 494, 539, and 761), and two values (158, 944) where all we know is that if k exists then it is greater than 10^15. See the table in the Links section. - Joseph Myers and Paul Zimmermann.
From Paul Zimmermann, Apr 17 2020: I have completed the full check for n=494 up to n+k=10^12. Thus a(494) >= 10^12-494. It took about 4 hours. The final check from 10^12 to 2314160375788+494+1 should take another 4-5 hours. (I don't want this comment to be lost, even though it will probably be replaced by something stronger very soon. - N. J. A. Sloane, Apr 17 2020)
From Paul Zimmermann, Apr 18 2020: (Start)
I confirm that a(44) = 2783191412912 and a(494) = 2314160375788. These were checked with a parallel version of Joseph's program (attached). For n=44 I ran the following script which submits 28 jobs checking each a range of 10^11 values:
for i in `seq 0 27`; do
kmin=`expr 1 + $i \* 100000000000`
kmax=`expr $kmin + 100000000000 - 1`
oarsub -p "cluster='grvingt'" -q production -l walltime=5 "./A332580 -kmin $kmin 44 $kmax"
done
The last job took a little less than 4 hours (wall clock time) on a 32-core cpu (64 virtual cores), thus it took a total of about 300 cpu days. (End)
a(944) <= 1032422879252. - Paul Zimmermann, Apr 19 2020

Examples

			a(1) = 1 as '1' || '2' = '12', which is divisible by 3 (where || denotes decimal concatenation).
a(2) = 80: the concatenation 2 || 3 || ... || 82 is
  23456789101112131415161718192021222324252627282930313233343536373839\
  40414243444546474849505152535455565758596061626364656667686970717273747\
  576777879808182, which is divisible by 83.
a(7) = 13 as '7' || '8' || '9' || '10' || '11' || '12' ||  ... || '20' = 7891011121314151617181920, which is divisible by 21.
a(8) = 2 as '8' || '9' || '10' = 8910, which is divisible by 11.
		

Crossrefs

Cf. A061836 (multiplication instead of concatenation), A281232, A332584, A332585 (length of the final concatenation). See A058183 for finding the length of a concatenation.
For records see A333546, A333547.
For n=44, see A332562.
See A332563, A332586 for a base 2 version.
See A281232 for the positions of the 1's.
A029455 is an older sequence in the same spirit.

Programs

  • Maple
    grow := proc(n,M) # searches out to a limit of M, returns [n,n+k] or [n,-1] if no k was found
      local R,i;
      R:=n;
      for i from n+1 to M do
        R:=R*10^length(i)+i;
        if (i mod 2) = 0 then
          if (R mod (i+1)) = 0 then return([n, i]); fi;
        fi;
      od:
      [n, -1];
    end;
    for n from 1 to 100 do lprint(grow(n,20000)); od;
  • PARI
    apply( {a(n,L=10^logint(n*10,10),c=n)= n%2||c=c*L+n+1; for(k=n+++n%2,oo, kM. F. Hasler, Feb 20 2020

Extensions

Edited by Max Alekseyev, Dec 26 2024

A317824 a(n) = A000422(n)^^A000422(n) (mod 10^len(A000422(n))), where ^^ indicates tetration or hyper-4 (e.g., 3^^4 = 3^(3^(3^3))).

Original entry on oeis.org

1, 21, 721, 8721, 8721, 708721, 5708721, 65708721, 165708721, 65165708721, 1165165708721, 861165165708721, 5861165165708721, 5005861165165708721, 55005861165165708721, 48055005861165165708721, 8448055005861165165708721, 388448055005861165165708721, 49388448055005861165165708721
Offset: 1

Views

Author

Marco Ripà, Aug 10 2018

Keywords

Comments

For any n, a(n) (mod 10^len(A000422(n))) == a(n + 1) (mod 10^len(A000422(n))), where len(k) := number of digits in k. Assuming len(a(n))>1, this is a general property of every concatenated sequence with fixed rightmost digits (such as A061839 or A014925), as shown in Ripà's book "La strana coda della serie n^n^...^n".

Examples

			For n = 3, a(3) = 321^^321 (mod 10^3) = 721. In fact, a(3) (mod 10^3) == a(4) (mod 10^3), since 721 (mod 10^3) == 8721 (mod 10^3).
		

References

  • Marco Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011, page 60. ISBN 978-88-6178-789-6

Crossrefs

Cf. A000422, A058183, A171882 (tetration), A317903.

Programs

  • PARI
    tmod(b, n) = {if (b % n == 0, return (0)); if (b % n == 1, return (1)); if (gcd(b, n)==1, return (lift(Mod(b, n)^tmod(b, lift(znorder(Mod(b, n))))))); lift(Mod(b, n)^(eulerphi(n) + tmod(b, eulerphi(n))));}
    f(n) = my(t=n); forstep(k=n-1, 1, -1, t=t*10^#Str(k)+k); t; \\ A000422
    a(n) = my(x=f(n)); tmod(x, 10^#Str(x)); \\ Michel Marcus, Sep 12 2021

Formula

a(n) = (n_n-1_n-2_...2_1)^^(n_n-1_n-2...2_1) (mod 10^len(n_n-1_n-2..._2_1)), where len(k) := number of digits in k.

Extensions

More terms from Jinyuan Wang, Aug 30 2020

A033713 Number of zeros in numbers 1 to 999..9 (n digits).

Original entry on oeis.org

0, 9, 189, 2889, 38889, 488889, 5888889, 68888889, 788888889, 8888888889, 98888888889, 1088888888889, 11888888888889, 128888888888889, 1388888888888889, 14888888888888889, 158888888888888889, 1688888888888888889, 17888888888888888889, 188888888888888888889, 1988888888888888888889
Offset: 1

Views

Author

Olivier Gorin (gorin(AT)roazhon.inra.fr)

Keywords

Comments

Also the first n places of 1, ..., n-digit numbers in the almost-natural numbers (A007376). - Erich Friedman.
a(n+1) is also the total number of digits in numbers from 1 through 999..9 (n digits). - Jianing Song, Apr 17 2022

References

  • M. Kraitchik, Mathematical Recreations. Dover, NY, 2nd ed., 1953, p. 49.

Crossrefs

Programs

  • Mathematica
    Table[ Sum[9i*10^(i - 1), {i, 1, n}], {n, 0, 16}]
    LinearRecurrence[{21,-120,100},{0,9,189},30] (* Harvey P. Dale, Jan 24 2012 *)
  • PARI
    a(n)=((n-1)*(10^n)-n*10^(n-1)+1)/9 \\ Charles R Greathouse IV, Feb 19 2017

Formula

From Stephen G Penrice, Oct 01 2000: (Start)
a(n) = (1/9)*((n-1)*(10^n)-n*10^(n-1)+1).
G.f.: (9*x^2)/((1-x)(1-10x)^2). (End)
a(n) = Sum_{i=1..n} 9*i*10^(i-1).
a(1)=0, a(2)=9, a(3)=189, a(n)=21*a(n-1)-120*a(n-2)+100*a(n-3). - Harvey P. Dale, Jan 24 2012
a(n+1) = A058183(10^n-1) for n >= 1. - Jianing Song, Apr 17 2022
E.g.f.: exp(x)*(1 + exp(9*x)*(9*x - 1))/9. - Stefano Spezia, Sep 13 2023

Extensions

More terms from Erich Friedman.
a(18)-a(21) from Stefano Spezia, Sep 13 2023

A158022 Integers k such that all the digits needed to write the consecutive nonnegative integers from 0 to k fill exactly a square (no holes, no overlaps).

Original entry on oeis.org

0, 3, 8, 12, 22, 36, 54, 76, 101, 121, 132, 156, 169, 197, 212, 244, 261, 297, 316, 356, 377, 421, 444, 492, 517, 569, 596, 652, 681, 741, 772, 836, 869, 937, 972, 10221, 10626, 11041, 11466, 11901, 12346, 12801, 13266, 13741, 14226, 14721, 15226
Offset: 1

Views

Author

Eric Angelini, Mar 11 2009

Keywords

Comments

The sides of the successive squares are given by A158023. Terms computed by Jean-Marc Falcoz.
Integers k such that A058183(k)+1 is a square. - Dominic McCarty, Mar 28 2025

Examples

			...0...01...012...0123...012345
.......23...345...4567...678910
............678...8910...111213
..................1112...141516
.........................171819
.........................202122
The integers fitting exactly in the SE corner of the above squares are 0, 3, 8, 12, 22. There is no 5x5 square where this is possible.
		

Crossrefs

Programs

  • Python
    from math import isqrt
    a, k, l = [], 0, 0
    while len(a) < 40:
        l += len(str(k))
        if l == isqrt(l) ** 2: a.append(k)
        k += 1
    print(a) # Dominic McCarty, Mar 28 2025
Showing 1-10 of 29 results. Next