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

A176942 Champernowne primes.

Original entry on oeis.org

1234567891, 12345678910111, 123456789101112131415161
Offset: 1

Views

Author

Marco Ripà, Jan 27 2011

Keywords

Comments

Primes formed from an initial portion 1234... of the infinite string 12345678910111213... of the concatenation of all positive integers (decimal digits of the Champernowne constant).
From Eric W. Weisstein, Jul 15 2013: (Start)
The next terms are too big to display:
a(4) = 123456789...1121131141 (235 digits)
a(5) = 123456789...6896997097 (2804 digits)
a(6) = 12345...13611362136313 (4347 digits)
a(7) = 123456789...9709971097 (37735 digits)
a(8) has more than 37800 digits. (End)
a(8) has more than 140000 digits. - Tyler Busby, Feb 12 2023

References

  • R. W. Stephan, Factors and primes in two Smarandache sequences.

Crossrefs

Cf. A007376 (infinite Barbier word = almost-natural numbers: write n in base 10 and juxtapose digits).
Cf. A033307 (decimal expansion of Champernowne constant).
Cf. A071620 (number of digits in the n-th Champernowne prime).
See A265043 for where to end the string of numbers that are being concatenated in order to get the n-th prime.

Programs

  • Mathematica
    With[{no=500},FromDigits/@Select[Table[Take[Flatten[IntegerDigits/@Range[no]],n],{n,no}],PrimeQ[FromDigits[#]]&]]  (* Harvey P. Dale, Feb 06 2011 *)
    Select[Table[Floor[N[ChampernowneNumber[10], n]*10^n], {n, 24}], PrimeQ] (* Arkadiusz Wesolowski, May 10 2012 *)

A078257 a(n) = denominator(N) where N = 0.123...n (concatenation of 1 to n after decimal point).

Original entry on oeis.org

10, 25, 1000, 5000, 20000, 15625, 10000000, 50000000, 1000000000, 10000000000, 10000000000000, 125000000000000, 100000000000000000, 5000000000000000000, 200000000000000000000, 25000000000000000000000, 10000000000000000000000000, 500000000000000000000000000, 100000000000000000000000000000
Offset: 1

Views

Author

Amarnath Murthy, Nov 24 2002

Keywords

Comments

Conjecture: sequence is not equal to the sequence of denominators presented in A172495 and A172506. - Jaroslav Krizek, Feb 05 2010
The conjecture is false for both other sequences; see A172495 and A172506 for proofs. - Michael S. Branicky, Nov 30 2022

Examples

			a(1) = 10 as 10*0.1 = 1, a(2) = 25 as 25*0.12 = 3.
		

Crossrefs

Cf. A058183, A078258 (numerators), A172495, A172506.

Programs

  • PARI
    a(n) = {my(s = ""); for (k=1, n, s = concat(s, Str(k))); denominator(eval(s)/10^(#s));} \\ Michel Marcus, Jan 15 2019
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        num, den, pow = 0, 1, 0
        for n in count(1):
            sn = str(n)
            num = num*10**len(sn) + n
            den *= 10**len(sn)
            pow += len(sn)
            nr, dr, c2, c5 = num, den, pow, pow
            while nr%2 == 0 and c2 > 0: nr //= 2; dr //= 2; c2 -= 1
            while nr%5 == 0 and c5 > 0: nr //= 5; dr //= 5; c5 -= 1
            yield dr
    print(list(islice(agen(), 19))) # Michael S. Branicky, Nov 30 2022

Formula

a(n) = denominator(Sum_{k=1..n} k/10^A058183(k)). - Stefano Spezia, Nov 30 2022

Extensions

More terms from Sascha Kurz, Jan 04 2003
More terms from Michel Marcus, Jan 15 2019

A075001 Smallest k such that the concatenation of n consecutive numbers starting with k (from k to n+k-1) is a multiple of n; or 0 if no such number exists.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 3, 5, 1, 1, 9, 1, 4, 7, 1, 5, 23, 1, 14, 1, 9, 9, 13, 5, 1, 21, 1, 13, 12, 1, 36, 21, 9, 3, 41, 1, 34, 33, 9, 21, 12, 9, 33, 9, 1, 13, 28, 5, 48, 1, 23, 21, 3, 1, 11, 13, 14, 41, 28, 1, 114, 115, 9, 41, 21, 9, 23, 69, 1, 61, 73, 5, 14, 43, 1, 145, 13, 9, 127, 41, 9, 95
Offset: 1

Views

Author

Amarnath Murthy, Aug 31 2002

Keywords

Comments

Conjecture: For every n there exists a k.
First occurrence of k where a(n)=k: 1, 103, 4, 13, 8, 105, 14, 87, 11, 699, 55, 29, 23, 19, 114, 261, 102, 97, 178, 219, 26, 121, 17, 151, 92, ..., . - Robert G. Wilson v
a(n)=1 iff n is in A029455. - Robert G. Wilson v
Increasing a(n)'s: 1, 3, 5, 9, 23, 36, 41, 48, 114, 115, 145, 166, 175, 221, 251, ..., at n = 1, 4, 8, 11, 17, 31, 35, 49, 61, 62, 76, 85, 122, 133, 170, 179, 217, 229, ..., . - Robert G. Wilson v

Examples

			a(11) = 9 as 910111213141516171819 the concatenation of 11 numbers from 9 to 19 is divisible by 11 (11*82737383012865106529).
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 1, id = Range@n}, While[k = FromDigits@Flatten@IntegerDigits@id/n; ! IntegerQ@k, id++; c++ ]; c]; Array[f, 82] (* Robert G. Wilson v, Oct 20 2007 *)
  • PARI
    /* The following program assumes the conjecture is true. */ /* It has found nonzero a(n) for n up to 500. */ {for(n=1,500, k=0; until(s%n==0,k++; s=0; for(m=k,k+n-1, s=s*(10^length(Str(m)))+m)); print1(k,","))}
    
  • PARI
    a(n) = {my(ld = 1, hd = n, qd, m = Mod(1, n), pow10, qdn = #digits(n), t=log(10*n+.5)\log(10)); qd = n*t+t-10^t\9; pow10 = Mod(10, n)^(qd-1); for(i = 2, n, m = m * Mod(10, n)^#digits(i) + i; ); while(1, if(lift(m) == 0, return(ld)); m -= ld * pow10; hd++; m = m * Mod(10, n)^#digits(hd) + hd; ld++; pow10*=10^(#digits(hd) - #digits(ld)); ) } \\ David A. Corneth, Aug 23 2020

Extensions

More terms from Rick L. Shepherd, Sep 03 2002

A053064 Alternately append n to end or beginning of previous term.

Original entry on oeis.org

1, 12, 312, 3124, 53124, 531246, 7531246, 75312468, 975312468, 97531246810, 1197531246810, 119753124681012, 13119753124681012, 1311975312468101214, 151311975312468101214, 15131197531246810121416, 1715131197531246810121416, 171513119753124681012141618
Offset: 1

Views

Author

Felice Russo, Feb 25 2000

Keywords

Comments

A055642(a(n)) = A058183(n); A007953(a(n)) = A037123(n); A010879(a(n)) = A010879(2*floor(n/2)) = A010879(A131055(n)); A000030(a(n)) = A000030(ceiling(n/2)). - Reinhard Zumkeller, Oct 10 2008

References

  • Felice Russo, A set of new Smarandache functions, sequences and conjectures in number theory, American Research Press 2000

Crossrefs

Extensions

More terms from Sean A. Irvine, Dec 05 2021

A078258 a(n) = numerator(N), where N = 0.123...n (concatenation of 1 to n after decimal point).

Original entry on oeis.org

1, 3, 123, 617, 2469, 1929, 1234567, 6172839, 123456789, 1234567891, 1234567891011, 15432098637639, 12345678910111213, 617283945505560657, 24691357820222426283, 3086419727527803285379, 1234567891011121314151617, 61728394550556065707580859, 12345678910111213141516171819
Offset: 1

Views

Author

Amarnath Murthy, Nov 24 2002

Keywords

Examples

			a(4) = 617 = smallest integer multiple of 0.1234, 617 = 5000*(0.1234).
		

Crossrefs

Cf. A058183, A078257 (denominators).

Programs

  • PARI
    a(n) = {my(s = ""); for (k=1, n, s = concat(s, Str(k))); numerator(eval(s)/10^(#s));} \\ Michel Marcus, Jan 15 2019
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        num, den, pow = 0, 1, 0
        for n in count(1):
            sn = str(n)
            num = num*10**len(sn) + n
            den *= 10**len(sn)
            pow += len(sn)
            nr, c2, c5 = num, pow, pow
            while nr%2 == 0 and c2 > 0: nr //= 2; c2 -= 1
            while nr%5 == 0 and c5 > 0: nr //= 5; c5 -= 1
            yield nr
    print(list(islice(agen(), 19))) # Michael S. Branicky, Nov 30 2022

Formula

a(n) = numerator(Sum_{k=1..n} k/10^A058183(k)). - Stefano Spezia, Nov 30 2022. (This is simply a restatement of the definition.)

Extensions

More terms from Sascha Kurz, Jan 04 2003
More terms from Michel Marcus, Jan 15 2019

A182402 Total number of digits in n-th row of a triangle formed by the positive integers.

Original entry on oeis.org

1, 2, 3, 5, 10, 12, 14, 16, 18, 20, 22, 24, 26, 34, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 171, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232
Offset: 1

Views

Author

Dave Durgin, Jun 19 2012

Keywords

Comments

Sequence is nonlinear at each decade transition; for example, row-5 transitions from single-digit (7) to double-digit (10) where sequence jumps (3) to (5); row-14 transitions from 2-digit (92) to 3-digit (105) where sequence jumps from (26) to (34).
The rows of nonlinearity are given by A068092. - Jon Perry, May 26 2013

Examples

			1; .................... (row 1 contains 1 digit)
2,   3; ............... (row 2 contains 2 digits)
4,   5,  6; ........... (row 3 contains 3 digits)
7,   8,  9, 10; ....... (row 4 contains 5 digits)
11, 12, 13, 14, 15; ... (row 5 contains 10 digits)
		

Crossrefs

Cf. A055642, A226029 (first differences).
Cf. A068092.

Programs

  • Haskell
    a182402 n = a182402_list !! (n-1)
    a182402_list = map (sum . map a055642) $ t 1 [1..] where
       t i xs = ys : t (i + 1) zs where
         (ys, zs) = splitAt i xs
    -- Reinhard Zumkeller, May 26 2013
    
  • Mathematica
    f[n_] := Length@ Flatten[ IntegerDigits[ Range[n (n - 1)/2 + 1, n (n + 1)/2]]]; Array[f, 58] (* Robert G. Wilson v, Sep 04 2013 *)
  • PARI
    a(n) = {my(x=n*(n-1)/2+1, y=n*(n+1)/2, nx=#Str(x), ny=#Str(y), s=0); for (i=nx, ny, if (i==nx, if (i==ny, s+=(y+1-x)*i, s+=(10^i-x)*i), if (i==ny, s+=(y+1-10^(i-1))*i, s+=i*(10^(i+1)-10^i+1)););); s;} \\ Michel Marcus, Jan 26 2022
    
  • Python
    def a(n): return len("".join(str(i) for i in range(n*(n+1)//2+1, (n+1)*(n+2)//2+1)))
    print([a(n) for n in range(58)]) # Michael S. Branicky, Jan 26 2022

Formula

a(n) = A058183(A000217(n)) - A058183(A000217(n-1)), n >= 2. - Omar E. Pol, Jun 25 2012

Extensions

Better definition from Omar E. Pol, Jun 25 2012

A279766 Number of odd digits in the decimal expansions of integers 1 to n.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64
Offset: 0

Views

Author

Joseph Myers, Dec 18 2016

Keywords

Comments

From Bernard Schott, Feb 19 2023: (Start)
Problem 1 of the British Mathematical Olympiad, round 1, in 2016/2017 asked: when the integers 1, 2, 3, ..., 2016 are written down in base 10, how many of the digits in the list are odd? The answer is a(2016) = 4015.
The similar sequence but with number of even digits is A358854. (End)

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
          nops(select(x-> x::odd, convert(n,base,10))))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 22 2016
  • Mathematica
    Table[Count[Flatten@ IntegerDigits@ Range[0, n], d_ /; OddQ@ d], {n, 0, 68}] (* or *)
    Accumulate@ Table[Count[IntegerDigits@ n, d_ /; OddQ@ d], {n, 0, 68}] (* Michael De Vlieger, Dec 22 2016 *)

Formula

a(n) = A196564(A007908(n)). - Michel Marcus, Dec 18 2016
a(n) = A117804(n+1) - A358854(n) (number of total digits - number of even digits). - Bernard Schott, Feb 19 2023

A332585 Number of digits in the number formed by concatenating the digits of n, n+1, ..., A332584(n), or -1 if A332584(n) = -1.

Original entry on oeis.org

2, 154, 6443, 26258, 2, 86, 25, 4, 4165, 38, 505, 42, 108, 319, 2906, 90, 445, 636086, 711, 54, 245, 22, 12, 126, 32, 154843, 20, 30, 883, 2057, 4970, 577, 76, 70, 139, 749, 40, 89959, 380407, 42715, 805, 8548, 2031
Offset: 1

Views

Author

Keywords

Comments

a(44) is currently unknown.

Examples

			For n=2, A332584(2) = 88, and the concatenation 2 || 3 || ... || 82 is
  23456789101112131415161718192021222324252627282930313233343536373839\
  40414243444546474849505152535455565758596061626364656667686970717273747\
  576777879808182, which has 154 digits. So a(2) = 154.
		

Crossrefs

Formula

Let f(i) = A058183(i). Assuming A332584(n)>0, a(n) = f(A332584(n))-f(n-1) for n>1. - N. J. A. Sloane, Feb 20 2020

A352991 Concatenation of all the distinct permutations of the first 1, 2, 3, ... (strictly) positive integers, arranged in ascending numerical order.

Original entry on oeis.org

1, 12, 21, 123, 132, 213, 231, 312, 321, 1234, 1243, 1324, 1342, 1423, 1432, 2134, 2143, 2314, 2341, 2413, 2431, 3124, 3142, 3214, 3241, 3412, 3421, 4123, 4132, 4213, 4231, 4312, 4321, 12345, 12354, 12435, 12453, 12534, 12543, 13245, 13254, 13425
Offset: 1

Views

Author

Marco Ripà, Apr 16 2022

Keywords

Comments

This sequence differs from A030299 starting from a(409114) = 10123456789. All the permutations are listed once and only once (e.g., the concatenation of the permutations of the elements of the set {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} originates the number 1112345678910 which is a unique element of this sequence and appears only once, since 1_11_23456789 = 11_1_23456789 = 1112345678910).
A001292 is a subsequence of the present sequence. An open problem, published by Kenichiro Kashihara in 1996 (see References, p. 25, #30, Problem 2), is to find how many terms of A001292 (which is a subsequence of A030299) are powers of integers; Kashihara conjectured that there are none (even if, clearly, A001292(1) = 1 should be disregarded in order to keep the conjecture alive). Currently, only the terms up to the prime a(409120) = 10123457689 have been directly checked by the author of this sequence and no nontrivial perfect power has been found. On the other hand, many (maybe infinitely many) terms of the present sequence are nontrivial powers of integers (e.g., A352329(2) to A352329(36) are squares of integers and belong to this sequence).
Although A181129 is a subsequence of the present one, so that A181129(1) = a(19) = 2341, a(14) is the smallest prime in this sequence.
The number of digits of a(n) comes from A058183. There are exactly k! (Cf. A000142) terms having A058183(k) digits. - David A. Corneth, Apr 17 2022

Examples

			a(3) = 21, since the number of permutations of {1, 2} is 2! = 2 and the concatenation 1_2 is smaller than 2_1 (while {1} originates only a(1) = 1, so that a(2) = 21).
		

References

  • Kenichiro Kashihara, Comments and Topics on Smarandache Notions and Problems, 25. Erhus University Press, Arizona, 1996. ISBN: 1-879585-55-3.

Crossrefs

Programs

  • Python
    from itertools import count, islice, permutations
    def agen(): # generator of terms
        for k in count(1):
            s = (int("".join(map(str, p))) for p in permutations(range(1, k+1)))
            yield from sorted(set(s))
    print(list(islice(agen(), 42))) # Michael S. Branicky, Apr 16 2022

A181373 Least m>0 such that prime(n) divides S(m)=A007908(m)=123...m and all numbers obtained by cyclic permutations of its digits; 0 if no such m exists.

Original entry on oeis.org

0, 2, 0, 100, 106, 120, 196, 102, 542, 400, 181, 21, 216, 372, 10446, 127, 10086, 616, 399, 1703, 196, 2009, 118, 12350, 516, 416, 13244, 884, 15462, 15146, 106, 1006942, 10762, 10814, 11634, 5808, 12408, 576, 30076, 4996, 25290, 1015092, 1108, 26874, 24036, 5994
Offset: 1

Views

Author

M. F. Hasler and Marco Ripà, Jan 27 2011

Keywords

Comments

The first three primes 2, 3 and 5 are particular cases, cf. examples. It happens that all other primes < 47 are in A180346 (and therefore have a(n) < 1000). P=37 is the only one among them with a(n) < 100 (but m=123 is another possibility for this prime).
Conjecture: a(n) > 0 for n <> 1 and n <> 3. - Chai Wah Wu, Oct 06 2023
Least m>0 such that prime(n) divides both A007908(m) and 10^A058183(m)-1; or 0 if no such m exists. - Chai Wah Wu, Oct 07 2023

Examples

			For prime(1)=2, no such m can exist (consider e.g. the initial 1 is permuted to the end), therefore a(1)=0.
For prime(2)=3, we have S(2)=12 and the permutation 21 both divisible by 3, thus a(2)=2. (There are many m for which the divisibility property is satisfied; it is equivalent to 1+...+m=0 (mod 3), or equivalently the sum of all these digits is divisible by 3. Therefore, the permutations do not need to be checked.)
For prime(3)=5, similar to prime(1)=2, no such m can exist.
For prime(4)=7, it turns out the m=100 is the least possibility, i.e., 123...99100 and the permutations 234...991001, 345...9910012, ... 100123...99, (00)123...991, (0)123...9910 are all divisible by 7.
		

Crossrefs

Cf. A000040, A007908, A058183, A180346 (see references there), A181373.

Programs

  • PARI
    A181373(p,LIM=999,MIN=1)={ p=prime(p); p!=2 & p!=5 & for(n=MIN,LIM, my(S=eval(concat(vector(n,i,Str(i)))),L=#Str(S)-1); S%p & next; for(k=1,L, (S=[1,10^L]*divrem(S,10)) % p & next(2)); return(n)) } /* highly unoptimized code, for illustration purpose */
    
  • Python
    from sympy import prime
    def A181373(n):
        s, p, l = '', prime(n), 0
        for m in range(1,10**6):
            u = str(m)
            s += u
            l += len(u)
            t = s
            if not int(t) % p:
                for i in range(l-1):
                    t = t[1:]+t[0]
                    if int(t) % p:
                        break
                else:
                    return m
        else:
            return 'search limit reached.' # Chai Wah Wu, Nov 12 2015
    
  • Python
    from itertools import count
    from sympy import prime
    def A181373(n):
        if n == 1 or n == 3: return 0
        p, c, q, a, b = prime(n), 0, 1, 10, 10
        for m in count(1):
            if m >= b:
                a = 10*a%p
                b *= 10
            c = (c*a + m) % p
            q = q*a % p
            if not (c or (q-1)%p):
                return m # Chai Wah Wu, Oct 07 2023

Formula

A007908( A181373(n) ) = 0 (mod A000040(n)).

Extensions

a(15)-a(31) from Chai Wah Wu, Nov 12 2015
a(32)-a(46) from Chai Wah Wu, Oct 06 2023
Previous Showing 11-20 of 29 results. Next