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

A171173 Triangle read by rows in which row n lists A033627(n) together with the first 2n-1 positive integers.

Original entry on oeis.org

2, 1, 4, 1, 2, 3, 7, 1, 2, 3, 4, 5, 10, 1, 2, 3, 4, 5, 6, 7, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 19, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 22, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 25, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 28, 1
Offset: 1

Views

Author

Omar E. Pol, Feb 23 2010

Keywords

Comments

The same as A171172 except the initial term.
Also, a(n) is the length of each component of the n-th L-toothpick added to the structure of A171165.
See also A171175, a permutation of the natural numbers.

Examples

			Triangle begins:
2,1,
4,1,2,3,
7,1,2,3,4,5,
10,1,2,3,4,5,6,7,
13,1,2,3,4,5,6,7,8,9,
16,1,2,3,4,5,6,7,8,9,10,11,
19,1,2,3,4,5,6,7,8,9,10,11,12,13,
22,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,
		

Crossrefs

Programs

  • Mathematica
    Join[{2,1},Flatten[Table[Flatten[{3n+1,Range[2n+1]}],{n,10}]]] (* Harvey P. Dale, Nov 24 2011 *)

A171174 Triangle read by rows in which row n lists A033627(n) together with the first 2n-1 numbers <> 0 of A038608.

Original entry on oeis.org

2, -1, 4, -1, 2, -3, 7, -1, 2, -3, 4, -5, 10, -1, 2, -3, 4, -5, 6, -7, 13, -1, 2, -3, 4, -5, 6, -7, 8, -9, 16, -1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 19, -1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 22, -1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15, 25, -1, 2, -3, 4
Offset: 1

Views

Author

Omar E. Pol, Feb 23 2010

Keywords

Comments

Absolute values give A171173.
Note that the partial sums of this sequence gives A171175, a permutation of the natural numbers.

Examples

			Triangle begins:
2, -1,
4, -1,2,-3,
7, -1,2,-3,4,-5,
10,-1,2,-3,4,-5,6,-7,
13,-1,2,-3,4,-5,6,-7,8,-9,
16,-1,2,-3,4,-5,6,-7,8,-9,10,-11,
19,-1,2,-3,4,-5,6,-7,8,-9,10,-11,12,-13,
22,-1,2,-3,4,-5,6,-7,8,-9,10,-11,12,-13,14,-15,
25,-1,2,-3,4,-5,6,-7,8,-9,10,-11,12,-13,14,-15,16,-17,
		

Crossrefs

A033628 Numbers that are in both the 1-additive and 0-additive sequences (A002858 and A033627).

Original entry on oeis.org

1, 2, 4, 13, 16, 28, 82, 97, 106, 145, 148, 175, 238, 241, 253, 316, 319, 358, 370, 382, 400, 409, 412, 451, 502, 544, 568, 607, 646, 673, 685, 688, 739, 751, 781, 820, 847, 949, 991, 1018, 1030, 1081, 1186, 1252, 1360, 1387, 1462, 1465, 1489, 1492
Offset: 1

Views

Author

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, C4

A227393 a(n) = concatenation of first 3n terms of A033627.

Original entry on oeis.org

1, 124, 12471013, 12471013161922, 12471013161922252831, 124710131619222252831343740, 124710131619222252831343740434649, 124710131619222252831343740434649525558
Offset: 1

Views

Author

V. T. Jayabalaji, Jul 15 2013

Keywords

Comments

All entries are == 1 (mod 3). V. T. Jayabalaji, Jul 13 2013

Examples

			124 is the concatenation of 1,2 and 4.
12471013 is the concatenation of 1, 2, 4, 7 10 and 13.
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Jul 16 2013

A011185 A B_2 sequence: a(n) = least value such that sequence increases and pairwise sums of distinct elements are all distinct.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 21, 30, 39, 53, 74, 95, 128, 152, 182, 212, 258, 316, 374, 413, 476, 531, 546, 608, 717, 798, 862, 965, 1060, 1161, 1307, 1386, 1435, 1556, 1722, 1834, 1934, 2058, 2261, 2497, 2699, 2874, 3061, 3197, 3332, 3629, 3712, 3868, 4140, 4447, 4640
Offset: 1

Views

Author

Keywords

Comments

a(n) = least positive integer > a(n-1) and not equal to a(i)+a(j)-a(k) for distinct i and j with 1 <= i,j,k <= n-1. [Comment corrected by Jean-Paul Delahaye, Oct 02 2020.]

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen(): # generator of terms
        aset, sset, k = set(), set(), 0
        while True:
            k += 1
            while any(k+an in sset for an in aset): k += 1
            yield k; sset.update(k+an for an in aset); aset.add(k)
    print(list(islice(agen(), 51))) # Michael S. Branicky, Feb 05 2023

Formula

a(n) = A010672(n-1)+1.

A026474 a(n) = least positive integer > a(n-1) and not equal to a(i)+a(j) or a(i)+a(j)+a(k) for 1<=i

Original entry on oeis.org

1, 2, 4, 8, 15, 22, 29, 36, 43, 50, 57, 64, 71, 78, 85, 92, 99, 106, 113, 120, 127, 134, 141, 148, 155, 162, 169, 176, 183, 190, 197, 204, 211, 218, 225, 232, 239, 246, 253, 260, 267, 274, 281, 288, 295, 302, 309, 316, 323, 330, 337, 344, 351, 358, 365, 372
Offset: 1

Views

Author

Keywords

Comments

All h-Stohr sequences have formula: h terms 1,2,..,2^(n-1),..,2^(h-1) and then continue (2^h-1)(n-h)+1. - Henry Bottomley, Feb 04 2000

Crossrefs

Programs

Formula

Starts 1, 2, 4 then the numbers 7*(n-3)+1.
a(n) = 7*n-20 for n>3. a(n) = 2*a(n-1)-a(n-2) for n>5. G.f.: x*(1+x^2+2*x^3+3*x^4)/(1-x)^2. - Colin Barker, Sep 19 2012

Extensions

More terms from Eric W. Weisstein

A002048 Segmented numbers, or prime numbers of measurement.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 14, 15, 16, 21, 22, 25, 26, 28, 33, 34, 35, 36, 38, 40, 42, 46, 48, 49, 50, 53, 57, 60, 62, 64, 65, 70, 77, 80, 81, 83, 85, 86, 90, 91, 92, 100, 104, 107, 108, 116, 119, 124, 127, 132, 133, 137, 141, 144, 145, 148, 150, 151, 154, 158, 159, 163, 165
Offset: 1

Views

Author

Keywords

Comments

The segmented numbers are the positive integers excluding those equal to the sum of two or more consecutive smaller terms. The prime numbers of measurement are their partial sums, cf. A002049. - M. F. Hasler, Jun 26 2019
Without the requirement that the smaller terms be consecutive, the sequence becomes the sequence of powers of 2 (A000079). - Alonso del Arte, Jan 25 2020

Examples

			Although 5 is the sum of the terms 1 and 4, those prior terms are not consecutive, and therefore 5 is in the sequence.
6 is not in the sequence because it is the sum of consecutive prior terms 2 and 4.
7 is not in the sequence either because it is also the sum of consecutive prior terms, in this case 1, 2, 4.
8 is in the sequence because no sum whatsoever of distinct prior terms adds up to 8.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, E30.
  • Š. Porubský, On MacMahon's segmented numbers and related sequences. Nieuw Arch. Wisk. (3) 25 (1977), no. 3, 403--408. MR0485763 (58 #5575)
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002049 (partial sums), A004978, A005242, A033627.

Programs

  • C
    // See Links section for C program by Samuel B. Reid, Jan 26 2020
    
  • Haskell
    import Data.List ((\\))
    a002048 n = a002048_list !! (n-1)
    a002048_list = f [1..] [] where
       f (x:xs) ys = x : f (xs \\ scanl (+) x ys) (x : ys)
    -- Reinhard Zumkeller, May 23 2013
    
  • Maple
    A002048 := proc(anmax::integer,printlist::boolean)
    local a, asum,su,i,piv,j;
    a := [];
    for i from 1 to anmax do
    a := [op(a),i];
    od:
    if printlist then
    printf("%d %d\n",1,a[1]);
    printf("%d %d\n",2,a[2]);
    fi;
    asum := [a[1]+a[2],a[2]];
    for i from 3 to anmax do
    asum := [op(asum),0];
    od:
    piv := 3;
    while piv <= nops(a) do
    for i from 1 to piv-2 do
    a := remove(has,a, asum[i]);
    od:
    if printlist then
    printf("%a %a\n",piv,a[piv]);
    fi;
    for i from 1 to piv do
    asum := subsop(i=asum[i]+a[piv], asum);
    od:
    piv := piv+1;
    od;
    RETURN(a);
    end:
    A002048(40000,true);
    # R. J. Mathar, Jun 04 2006
  • Mathematica
    A002048[anmax_] := (a = {}; Do[AppendTo[a, i], {i, anmax}]; asum = {a[[1]] + a[[2]], a[[2]]}; Do[AppendTo[asum, 0], {i, 3, anmax}]; piv = 3; While[piv <= Length[a], Do[a = DeleteCases[a, asum[[i]]], {i, 1, piv - 2}]; Do[asum[[i]] += a[[piv]], {i, piv}]; piv = piv + 1;]; a); A002048[63] (* Jean-François Alcover, Jul 28 2011, converted from R. J. Mathar's Maple prog. *)
    searchMax = 200; segmNums = {1}; curr = 2; While[curr < searchMax, If[Not[MemberQ[Apply[Plus, Subsequences[segmNums], 1], curr]], AppendTo[segmNums, curr], ];  curr = curr + 1]; segmNums (* Alonso del Arte, Jan 25 2020 *)
  • Python
    from itertools import count, accumulate, islice
    from collections import deque
    def A002048_gen(): # generator of terms
        aset, alist = set(), deque()
        for k in count(1):
            if k in aset:
                aset.remove(k)
            else:
                yield k
                aset |= set(k+d for d in accumulate(alist))
                alist.appendleft(k)
    A002048_list = list(islice(A002048_gen(),20)) # Chai Wah Wu, Sep 01 2025

Formula

Andrews conjectures that lim_{n -> oo} n log n / (a(n) loglog n) = 1. - N. J. A. Sloane, Dec 01 2013

Extensions

More terms from R. J. Mathar, May 31 2006

A051039 4-Stohr sequence.

Original entry on oeis.org

1, 2, 4, 8, 16, 31, 46, 61, 76, 91, 106, 121, 136, 151, 166, 181, 196, 211, 226, 241, 256, 271, 286, 301, 316, 331, 346, 361, 376, 391, 406, 421, 436, 451, 466, 481, 496, 511, 526, 541, 556, 571, 586, 601, 616, 631, 646, 661, 676, 691, 706, 721, 736, 751
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = 15*n-59 for n>4. a(n) = 2*a(n-1)-a(n-2) for n>6. G.f.: x*(7*x^5+4*x^4+2*x^3+x^2+1)/(x-1)^2. - Colin Barker, Sep 19 2012

A026471 a(n) = least positive integer > a(n-1) and not of the form a(i) + a(j) + a(k) for 1 <= i < j < k <= n.

Original entry on oeis.org

1, 2, 3, 4, 5, 13, 14, 15, 25, 26, 27, 37, 38, 48, 49, 50, 60, 61, 71, 72, 73, 83, 84, 94, 95, 96, 106, 107, 117, 118, 119, 129, 130, 140, 141, 142, 152, 153, 163, 164, 165, 175, 176, 186, 187, 188, 198, 199, 209, 210, 211, 221, 222, 232, 233, 234, 244, 245, 255
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

{1, 5, 13} union {n congruent 2, 3, 4, 14, 15 mod 23}, proved by Matthew Akeran. - Ralf Stephan, Nov 15 2004
G.f.: (9*x^11-7*x^10+9*x^8+7*x^5+x^4+x^3+x^2+x+1)*x/(x^6-x^5-x+1). - Alois P. Heinz, Aug 06 2018

Extensions

Edited by Floor van Lamoen, Sep 02 2002

A060469 Smallest positive a(n) such that number of solutions to a(n) = a(j)+a(k) j

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 11, 13, 16, 18, 23, 25, 28, 30, 35, 37, 40, 42, 47, 49, 52, 54, 59, 61, 64, 66, 71, 73, 76, 78, 83, 85, 88, 90, 95, 97, 100, 102, 107, 109, 112, 114, 119, 121, 124, 126, 131, 133, 136, 138, 143, 145, 148, 150, 155, 157, 160, 162, 167, 169, 172, 174
Offset: 1

Views

Author

Henry Bottomley, Mar 15 2001

Keywords

Comments

Numbers {1,4,6,11} mod 12 plus {2,3,8}.

Examples

			11 is in the sequence since it is 3+8 but no other sum of two distinct terms.
		

Crossrefs

Virtually identical to A003662.

Programs

  • Mathematica
    LinearRecurrence[{1, 0, 0, 1, -1}, {1, 2, 3, 4, 6, 8, 11, 13, 16, 18, 23}, 100] (* Paolo Xausa, Mar 04 2024 *)
  • PARI
    Vec(x*(2*x^10+x^8+x^7+2*x^6+x^5+x^4+x^3+x^2+x+1)/((x-1)^2*(x+1)*(x^2+1)) + O(x^100)) \\ Colin Barker, Feb 27 2015

Formula

a(n) = a(n-1)+a(n-4)-a(n-5) for n>9. - Colin Barker, Feb 27 2015
G.f.: x*(2*x^10+x^8+x^7+2*x^6+x^5+x^4+x^3+x^2+x+1) / ((x-1)^2*(x+1)*(x^2+1)). - Colin Barker, Feb 27 2015
a(n) = (6*n - 22 - (-1)^n + A056594(n) - A056594(n+1))/2 for n > 6. - Stefano Spezia, Mar 11 2025
Showing 1-10 of 35 results. Next