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.

User: Dave Durgin

Dave Durgin's wiki page.

Dave Durgin has authored 13 sequences. Here are the ten most recent ones:

A316988 The odd members of the "Almost natural numbers" (A007376).

Original entry on oeis.org

1, 3, 5, 7, 9, 1, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 7, 1, 1, 9, 1, 3, 5, 7, 9, 3, 3, 1, 3, 3, 3, 3, 3, 5, 3, 3, 7, 3, 3, 9, 1, 3, 5, 7, 9, 5, 5, 1, 5, 5, 3, 5, 5, 5, 5, 5, 7, 5, 5, 9, 1, 3, 5, 7, 9, 7, 7, 1, 7, 7, 3, 7, 7, 5, 7, 7, 7, 7, 7, 9, 1, 3, 5, 7, 9, 9, 9, 1, 9, 9, 3, 9, 9, 5, 9, 9, 7, 9, 9, 9, 1
Offset: 1

Author

Dave Durgin, Jul 18 2018

Keywords

Comments

Also odd members of A033307.
As the number of terms approaches infinity, each odd term appears equally often. - Robert G. Wilson v, Aug 01 2018

Examples

			The initial (15) terms of A007376 are 1,2,3,4,5,6,7,8,9,1,0,1,1,1,2; omitting the even terms 2,4,6,8,0,2 leaves the first (8) odd terms 1,3,5,7,9,1,1,1: a(1) through a(8).
		

Crossrefs

Programs

  • Mathematica
    Select[ Flatten[ IntegerDigits /@ Range@100], OddQ] (* Robert G. Wilson v, Aug 01 2018 *)
  • PARI
    search(n) = for(k=1, n, my(d=select(x->x%2, digits(k))); for(m=1, #d, print1(d[m], ", ")))
    /* Call the function as follows to generate terms */
    search(40) \\ Felix Fröhlich, Aug 01 2018

A317647 The even members of the "Almost natural numbers" (A007376).

Original entry on oeis.org

2, 4, 6, 8, 0, 2, 4, 6, 8, 2, 0, 2, 2, 2, 2, 2, 4, 2, 2, 6, 2, 2, 8, 2, 0, 2, 4, 6, 8, 4, 0, 4, 4, 2, 4, 4, 4, 4, 4, 6, 4, 4, 8, 4, 0, 2, 4, 6, 8, 6, 0, 6, 6, 2, 6, 6, 4, 6, 6, 6, 6, 6, 8, 6, 0, 2, 4, 6, 8, 8, 0, 8, 8, 2, 8, 8, 4, 8, 8, 6, 8, 8, 8, 8, 0, 2, 4, 6, 8, 0, 0
Offset: 1

Author

Dave Durgin and Robert G. Wilson v, Aug 02 2018

Keywords

Comments

Also even members of A033307.

Examples

			The initial (15) terms of A007376 are 1,2,3,4,5,6,7,8,9,1,0,1,1,1,2; omitting the odd terms 1,3,5,7,9,1,1,1 leaves the first 6 even terms 2,4,6,8,0,2: a(1) through a(6).
		

Crossrefs

Programs

  • Mathematica
    Select[ Flatten[ IntegerDigits /@ Range@ 100], EvenQ]

A275589 The almost-natural numbers with prime digits removed.

Original entry on oeis.org

1, 4, 6, 8, 9, 1, 0, 1, 1, 1, 1, 1, 4, 1, 1, 6, 1, 1, 8, 1, 9, 0, 1, 4, 6, 8, 9, 0, 1, 4, 6, 8, 9, 4, 0, 4, 1, 4, 4, 4, 4, 4, 4, 6, 4, 4, 8, 4, 9, 0, 1, 4, 6, 8, 9, 6, 0, 6, 1, 6, 6, 6, 4, 6, 6, 6, 6, 6, 8, 6, 9, 0, 1, 4, 6, 8, 9, 8, 0, 8, 1, 8, 8, 8, 4, 8
Offset: 1

Author

Dave Durgin, Aug 02 2016

Keywords

Comments

Nonprime complement of A275542.

Examples

			Write the digits of the positive integers in continuous form: 1,2,3,4,5,6,7,8,9,1,0,1,1,1,2,1,3,1,4,1,5,...; then remove prime digits (2,3,5,7) from the sequence.
		

Crossrefs

Nonprimes of A007376 and/or A033307.
Cf. A275542.

Programs

Extensions

More terms from Robert Price, Mar 31 2017

A275542 The digits of the integers with the nonprimes removed.

Original entry on oeis.org

2, 3, 5, 7, 2, 3, 5, 7, 2, 2, 2, 2, 2, 3, 2, 2, 5, 2, 2, 7, 2, 2, 3, 3, 3, 2, 3, 3, 3, 3, 5, 3, 3, 7, 3, 3, 2, 3, 5, 7, 5, 5, 5, 2, 5, 3, 5, 5, 5, 5, 5, 7, 5, 5, 2, 3, 5, 7, 7, 7, 7, 2, 7, 3, 7, 7, 5, 7, 7, 7, 7, 7, 2, 3, 5, 7, 2, 3, 5, 7
Offset: 1

Author

Dave Durgin, Aug 01 2016

Keywords

Comments

Write the digits of the positive integers one by one: 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, etc. (this is A007376). Then from that sequence, remove the nonprimes, leaving a sequence that consists entirely of 2s, 3s, 5s and 7s.

Examples

			From the single-digit numbers, we obviously get the first four terms of this sequence: 2, 3, 5, 7.
10 is composite and neither of its digits is a single-digit prime, so it contributes nothing to this sequence.
11 is prime but its digits consist of two 1s, so like 10 it also contributes nothing to the sequence.
12 is composite, but its least significant digit is 2, which is a prime, and thus 12 contributes a 2 to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Select[IntegerDigits[n], PrimeQ], {n, 100}]] (* Alonso del Arte, Aug 01 2016 *)

A251599 Centers of rows of the triangular array formed by the natural numbers.

Original entry on oeis.org

1, 2, 3, 5, 8, 9, 13, 18, 19, 25, 32, 33, 41, 50, 51, 61, 72, 73, 85, 98, 99, 113, 128, 129, 145, 162, 163, 181, 200, 201, 221, 242, 243, 265, 288, 289, 313, 338, 339, 365, 392, 393, 421, 450, 451, 481, 512, 513, 545, 578, 579, 613, 648, 649, 685, 722, 723
Offset: 1

Author

Dave Durgin, Dec 05 2014

Keywords

Comments

Forms a cascade of 3-number triangles down the center of the triangle array. Related to A000124 (left/west bank of same triangular array), A000217 (right/east bank) and A001844 (center column).
Sums of the mentioned cascading triangles: a(3*n-2) + a(3*n-1) + a(3*n) = A058331(n) + A001105(n) + A001844(n-1) = 2*A056106(n) = 2*(3*n^2-n+1). - Reinhard Zumkeller, Dec 13 2014
Union of A080827 and A000982. - David James Sycamore, Aug 09 2018

Examples

			First ten terms (1,2,3,5,8,9,13,18,19,25) may be read down the center of the triangular formation:
               1
             2   3
           4   5   6
         7   8   9  10
      11  12  13  14  15
    16  17  18  19  20  21
  22  23  24  25  26  27  28
		

Crossrefs

Cf. A092942 (first differences).

Programs

  • Haskell
    a251599 n = a251599_list !! (n-1)
    a251599_list = f 0 $ g 1 [1..] where
       f i (us:vs:wss) = [head $ drop i us] ++ (take 2 $ drop i vs) ++
                         f (i + 1) wss
       g k zs = ys : g (k + 1) xs where (ys,xs) = splitAt k zs
    -- Reinhard Zumkeller, Dec 12 2014
    
  • Maple
    a:= n-> (m-> 2*(m+1)^2-[2*m+1, 0, -1][1+r])(iquo(n-1, 3, 'r')):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 10 2014
  • Mathematica
    LinearRecurrence[{1, 0, 2, -2, 0, -1, 1}, {1, 2, 3, 5, 8, 9, 13}, 60] (* Jean-François Alcover, Jan 09 2016 *)
  • PARI
    Vec(-x*(x^2+1)*(x^4-x^3+x+1)/((x^2+x+1)^2*(x-1)^3) + O(x^80)) \\ Michel Marcus, Jan 09 2016

Formula

Terms for n=1 (mod 3): 2m^2+2m+1, for n=2 (mod 3): 2m^2+4m+2, for n=0 (mod 3): 2m^2+4m+3, where m = floor((n-1)/3).
G.f.: -x*(x^2+1)*(x^4-x^3+x+1)/((x^2+x+1)^2*(x-1)^3). - Alois P. Heinz, Dec 10 2014

A229527 Start with 1, skip (sum of digits of n) numbers, accept next number.

Original entry on oeis.org

1, 3, 7, 15, 22, 27, 37, 48, 61, 69, 85, 99, 118, 129, 142, 150, 157, 171, 181, 192, 205, 213, 220, 225, 235, 246, 259, 276, 292, 306, 316, 327, 340, 348, 364, 378, 397, 417, 430, 438, 454, 468, 487, 507, 520, 528, 544, 558, 577, 597
Offset: 1

Author

Dave Durgin, Sep 25 2013

Keywords

Examples

			a(1)=1, a(2)=1+1+1=3, a(3)=3+3+1=7, a(4)=7+7+1=15, a(5)=15+1+5+1=22, a(6)=22+2+2+1=27, ...
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = a[n - 1] + 1 + Plus @@ IntegerDigits@a[n - 1]; a[1] = 1; Array[a, 50] (* Robert G. Wilson v, Aug 01 2018 *)
  • Python
    from itertools import islice
    def A229527_gen(): # generator of terms
        a = 1
        while True:
            yield a
            a += sum(map(int,str(a)))+1
    A229527_list = list(islice(A229527_gen(),40)) # Chai Wah Wu, Aug 09 2025

Formula

a(n+1) = a(n) + (sum of digits of a(n)) + 1.

A225985 List the positive numbers, remove even digits (including zeros) from each term; sequence = remaining terms.

Original entry on oeis.org

1, 3, 5, 7, 9, 1, 11, 1, 13, 1, 15, 1, 17, 1, 19, 1, 3, 5, 7, 9, 3, 31, 3, 33, 3, 35, 3, 37, 3, 39, 1, 3, 5, 7, 9, 5, 51, 5, 53, 5, 55, 5, 57, 5, 59, 1, 3, 5, 7, 9, 7, 71, 7, 73, 7, 75, 7, 77, 7, 79, 1, 3, 5, 7, 9, 9, 91, 9, 93, 9, 95, 9, 97, 9, 99, 1, 11, 1, 13
Offset: 1

Author

Dave Durgin, May 22 2013

Keywords

Examples

			The natural numbers with at least one odd digit in their decimal representation are: 1, 3, 5, 7, 9, 10, 11, 12, 13, ...
By excluding their even digits, we obtain: 1, 3, 5, 7, 9, 1, 11, 1, 13, ...
Hence: a(1)=1, a(2)=3, a(3)=5, a(4)=7, a(5)=9, a(6)=1, a(7)=11, a(8)=1, a(9)=13, .... [Example corrected by _Paul Tek_, May 24 2013]
		

Crossrefs

Cf. A038573.
Cf. A014261 (duplicates removed), A226091.

Programs

  • Haskell
    a225985 n = a225985_list !! (n-1)
    a225985_list = map read $ filter (not . null) $
        map (filter (`elem` "13579") . show) [0..] :: [Integer]
    -- Reinhard Zumkeller, May 26 2013
    
  • Mathematica
    FromDigits[DeleteCases[IntegerDigits[#],?EvenQ]]&/@Range[200]/. (0-> Nothing) (* _Harvey P. Dale, Apr 04 2017 *)
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        for n in count(1):
            removed  = "".join(d if d in "13579" else "" for d in str(n))
            if removed != "": yield int(removed)
    print(list(islice(agen(), 80))) # Michael S. Branicky, Aug 05 2022

Formula

a(A226091(n)) = A014261(n). - Reinhard Zumkeller, May 26 2013

Extensions

Definition clarified by N. J. A. Sloane, Aug 06 2022 at the suggestion of Michel Marcus

A224780 Strings of ascending digits in A007376.

Original entry on oeis.org

123456789, 12, 12, 23, 23, 34, 34, 45, 45, 56, 56, 67, 67, 78, 78, 89, 89, 12, 12, 12, 123, 12, 12, 12, 12, 12, 12, 34, 45, 56, 67, 78, 89, 12, 12, 12, 23, 23, 23, 123, 23, 234, 23, 23, 23, 23, 23, 12, 45, 12, 56, 12, 67, 12, 78, 12, 89, 12, 23, 123, 23, 23, 23, 34, 34, 34, 34, 234, 34, 345, 34, 34, 34, 34, 23, 56, 23, 67, 23, 78, 23, 89
Offset: 1

Author

Dave Durgin, Apr 17 2013

Keywords

Comments

We sample each digit in A007376 in turn; accept the longest string for which A(n+1)-A(n)=1, A(n+2)-A(n+1)=1 and so on.
We recognize only strings of length >=2 and not strings with leading zeros.
Series is infinite, but there are only 36 possible consecutive strings: 12, 123, 1234,...,123456789 (eight beginning with 1), 23, 234, 2345,...,23456789 (seven beginning with 2) and so on.

Examples

			The 1st five terms imbedded in A007376 in brackets: [123456789]1011[12]13141516171819202[12]2[23]24252627282930313[23]
		

Programs

  • Maple
    A007376 := [] :
    for n from 1 to 400 do
        nb := convert(n,base,10) ;
        A007376 := [op(A007376),op(ListTools[Reverse](nb))] ;
    end do:
    str := 1 :
    while true do
        for a from 1 do
            if op(str+a,A007376) <> 1+op(str+a-1,A007376) then
                break;
            end if;
        end do:
        L := ListTools[Reverse]([op(str..str+a-1,A007376)]) ;
        if nops(L) > 1 and op(-1,L) > 0 then
            add( op(i,L)*10^(i-1),i=1..nops(L)) ;
            printf("%d,",%) ;
        end if;
        str := str+a ;
    end do: # R. J. Mathar, Apr 26 2013

A222621 a(n) = (2n-1)^(2n).

Original entry on oeis.org

1, 81, 15625, 5764801, 3486784401, 3138428376721, 3937376385699289, 6568408355712890625, 14063084452067724991009, 37589973457545958193355601, 122694327386105632949003612841, 480250763996501976790165756943041, 2220446049250313080847263336181640625
Offset: 1

Author

Dave Durgin, Feb 26 2013

Keywords

Examples

			1^2; 3^4; 5^6; 7^8 and so on.
		

Crossrefs

Programs

Formula

a(n) = A005408(n-1)^A005843(n). - Michel Marcus, Apr 14 2018
Sum_{n>=1} 1/a(n) = A338168. - Amiram Eldar, Nov 29 2020

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

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