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-5 of 5 results.

A331614 a(n+1) is the number of times a(n) is the sum of one or more consecutive terms in this sequence so far with a(1) = 1.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 4, 3, 3, 4, 4, 5, 4, 6, 4, 7, 5, 5, 6, 5, 7, 6, 6, 7, 7, 8, 3, 5, 8, 5, 9, 7, 9, 8, 6, 8, 7, 10, 7, 11, 8, 8, 9, 9, 10, 8, 10, 9, 11, 9, 12, 6, 9, 13, 8, 11, 10, 10, 11, 11, 12, 7, 12, 8, 12, 9, 14, 10, 12, 10, 13, 9, 15, 7, 13, 10, 14, 11, 13, 11, 14, 12, 11, 15
Offset: 1

Views

Author

S. Brunner, Jan 22 2020

Keywords

Examples

			For example we look for the next 2 terms after a(7) = 4:
The sequence so far: 1, 1, 2, 2, 3, 2, 4.
We count how many times we can sum up consecutive terms to get 4 as result (and include all 4's already in the sequence).
There are 3 ways to get a sum of 4: 1 + 1 + 2, 2 + 2 and 4. This gives us a(8) = 3.
For the next term we count all sums of 3 we can get: 1 + 2, 3, 3. This means there are 3 ways and a(9) = 3.
		

Crossrefs

Cf. A332518.

Programs

  • Excel
    Cell A1: 1
    Cell A2: =countif(A$1:AZ1;A1)
    Cell B2: =if(A1="";"";A1+$A2)
    Copy B2 and paste into area B2:AZ2
    Copy row 2 and paste down (5000 lines worked, more could be slow)
    
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Block[{c = 0, j, s}, Do[j = i; s = 0; While[j < n && s < a[n - 1], s += a[j]; j++]; If[s == a[n - 1], c++], {i, n - 1}]; c]; Array[a, 84] (* Giovanni Resta, Jan 23 2020 *)
    (* Second program needing version >= 10.1 *)
    a[n_] := a[n] = If[n == 1, 1, SequenceCount[Array[a, n-1], s_ /; Total[s] == a[n-1], Overlaps -> True]];
    Array[a, 100] (* Jean-François Alcover, Feb 15 2020 *)
  • PARI
    for (n=1, #a=vector(#t=vector(84)), print1 (a[n]=if(n==1, 1, t[a[n-1]])", "); s=0; forstep (k=n, 1, -1, if (#tRémy Sigrist, Feb 14 2020

A358799 a(0) = 0, and for any n >= 0, a(n+1) is the number of ways to write a(n) = a(i) XOR ... XOR a(j) with 0 <= i <= j <= n (where XOR denotes the bitwise XOR operator).

Original entry on oeis.org

0, 1, 2, 1, 3, 4, 2, 5, 4, 5, 6, 8, 2, 11, 2, 13, 6, 14, 10, 9, 9, 12, 14, 16, 2, 24, 6, 29, 5, 23, 3, 27, 12, 23, 9, 26, 17, 13, 26, 19, 15, 32, 4, 46, 2, 51, 1, 45, 6, 48, 6, 49, 7, 41, 9, 47, 10, 49, 17, 37, 21, 38, 23, 36, 24, 49, 30, 48, 24, 52, 22, 45
Offset: 0

Views

Author

Rémy Sigrist, Dec 06 2022

Keywords

Comments

This sequence is a variant of A331614 and A332518; here we use binary XOR, there addition and multiplication, respectively.
This sequence is unbounded (if the sequence was bounded, with greatest value m, then, by the pigeonhole principle, some value, say v, would appear infinitely many times, and the next value after the (m+1)-th occurrence of v would be > m, a contradiction).

Examples

			The first terms, alongside the corresponding pairs (i,j)'s, are:
  n   a(n)  (i,j)'s
  --  ----  ---------------------------------------------------------
   0     0  N/A
   1     1  (0,0)
   2     2  (0,1), (1,1)
   3     1  (2,2)
   4     3  (0,1), (1,1), (3,3)
   5     4  (0,2), (1,2), (2,3), (4,4)
   6     2  (2,5), (5,5)
   7     5  (0,3), (1,3), (2,2), (3,4), (6,6)
   8     4  (0,5), (1,5), (4,6), (7,7)
   9     5  (2,5), (3,6), (4,8), (5,5), (8,8)
  10     6  (0,5), (1,5), (3,8), (4,6), (7,7), (9,9)
  11     8  (0,8), (1,8), (2,6), (3,5), (3,10), (5,6), (6,9), (10,10)
  12     2  (6,11), (11,11)
		

Crossrefs

Programs

  • C
    See Links section.

A336037 a(n+1) is the number of times the binary representation of a(n) is the concatenation of that of one or more consecutive terms in this sequence so far with a(1) = 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 2, 3, 3, 4, 1, 4, 2, 4, 3, 5, 2, 5, 3, 6, 2, 6, 3, 7, 2, 7, 3, 8, 1, 5, 4, 4, 5, 5, 6, 4, 6, 5, 7, 4, 7, 5, 8, 2, 8, 3, 9, 2, 9, 3, 10, 2, 10, 3, 11, 2, 11, 3, 12, 2, 12, 3, 13, 3, 14, 3, 15, 2, 13, 4, 8, 4, 9, 4, 10, 4, 11, 4, 12, 4, 13, 5
Offset: 1

Views

Author

Rémy Sigrist, Jul 07 2020

Keywords

Comments

This sequence has similarities with A331614 and A332518; here we concatenate consecutive terms, there we add and multiply them, respectively.
This sequence is unbounded.

Examples

			The first terms, alongside their binary representation and the corresponding concatenations, are:
  n   a(n)  bin(a(n))  Concatenations
  --  ----  ---------  --------------
   1     1          1  a(1)
   2     1          1  a(1), a(2)
   3     2         10  a(3)
   4     1          1  a(1), a(2), a(4)
   5     3         11  a(1)|a(2), a(5)
   6     2         10  a(3), a(6)
   7     2         10  a(3), a(6), a(7)
   8     3         11  a(1)|a(2), a(5), a(8)
   9     3         11  a(1)|a(2), a(5), a(8), a(9)
  10     4        100  a(10)
		

Crossrefs

Programs

  • PARI
    See Links section.

A338759 a(n+1) is the maximum number of groups which can be built from the terms in this sequence so far and using each term only once which result in a(n) as their product with a(1) = 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 2, 2, 3, 2, 4, 4, 5, 2, 5, 3, 3, 4, 6, 6, 7, 1, 7, 2, 6, 8, 5, 4, 8, 7, 3, 5, 5, 6, 10, 7, 4, 9, 3, 6, 12, 13, 1, 8, 9, 5, 7, 5, 8, 10, 8, 11, 1, 9, 6, 13, 2, 7, 6, 14, 7, 7, 8, 12, 15, 7, 9, 7, 10, 10, 11, 2, 8, 13, 3, 7, 11, 3, 8, 14
Offset: 1

Views

Author

S. Brunner, Nov 07 2020

Keywords

Comments

This sequence is a variant of A332518 without the requirement that all factors have to be consecutive numbers.

Examples

			To get a(n+1), count how many times a(n) appears in the sequence.
For 1 and primes, this is already a(n+1).
For prime squares, also count how many times the prime factor appears in the sequence, divide it by 2 and round it down.
For example, the next term after a(43) = 9 is 3, because 9 appeared 1 time (at a(43) itself) and 3 appeared 5 times, which can arranged in 2 groups of 3 X 3.
For semiprimes, count how many times the semiprime itself appears in the sequence. Then count how many times the 2 factors appear and add the smallest number.
For example, the next term after a(30) = 6 is 8, because 6 appeared 4 times and the factors 2 and 3 appeared 6 and 4 times. We can build 4 groups of 2 X 3 of them.
		

Crossrefs

Cf. A001222 (bigomega), A162247 (all factorizations of n).
Cf. A332518.

A338775 a(n+1) is the number of times a(n) is the least common multiple of one or more consecutive terms in this sequence so far with a(1) = 1.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Nov 08 2020

Keywords

Comments

This sequence is a variant of A332518.
This sequence is unbounded.

Examples

			For n = 2:
- a(1) = lcm(a(1)),
- so a(2) = 1.
For n = 3:
- a(2) = lcm(a(1)) = lcm(a(2)) = lcm(a(1), a(2)),
- so a(3) = 3.
For n = 4:
- a(3) = lcm(a(3)) = lcm(a(2), a(3)) = lcm(a(1), a(2), a(3)),
- so a(4) = 3.
		

Crossrefs

Cf. A332518.

Programs

  • PARI
    See Links section.
Showing 1-5 of 5 results.