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: Floor van Lamoen

Floor van Lamoen's wiki page.

Floor van Lamoen has authored 246 sequences. Here are the ten most recent ones:

A248898 Numbers k such that A246964(k) = 1.

Original entry on oeis.org

0, 2, 4, 6, 9, 11, 13, 15, 17, 19, 23, 25, 27, 29, 32, 34, 36, 38, 40, 42, 46, 48, 50, 52, 55, 59, 61, 63, 65, 69, 71, 73, 75, 77, 79, 82, 84, 86, 88, 90, 92, 96, 98, 100, 102, 105, 107, 109, 111, 113, 115, 119, 121, 123, 125, 128, 132, 134, 136, 138, 142, 144, 146, 148, 150
Offset: 1

Author

Floor van Lamoen, Mar 06 2015

Keywords

Crossrefs

Cf. A246964.

A248797 Number of terms > 1 in Fibonacci-variation of Collatz sequence starting with (1, 2n+1).

Original entry on oeis.org

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

Author

Floor van Lamoen, Mar 03 2015

Keywords

Comments

In a Fibonacci-variation of Collatz sequence the next term is the odd part of the sum of the preceding two terms. The sequence terminates when 1 is reached. All sequences with initial values {1, 2n+1} terminate.
Proof: Let FC be Fibonacci-variation of Collatz sequence, then FC_{n+1} <= max(FC_{n},FC_{n-1}), with = only if FC_{n}=FC_{n-1}. Therefore FC cannot get into a loop of length greater than 1 (because for all i>n FC_{i}< max(FC_{n},FC_{n+1}). When FC_{n} and FC_{n-1} are coprime, FC_{n} and FC_{n+1} are coprime as well. We conclude that with initial values 1 and 2n+1 (n>0) all pairs of consecutive terms must be coprime, hence cannot become constant (loop of length 1) different from 1.

Examples

			a(8)=8 as the Fibonacci-Collatz sequence starting with 1, 17 becomes 1, 17, 9, 13, 11, 3, 7, 5, 3, 1 and has 8 terms > 1.
		

Crossrefs

Programs

  • Maple
    b:= proc(i, j) local m, r; m:= i+j;
          while irem(m, 2, 'r')=0 do m:=r od; m
        end:
    a:= proc(n) local i, j, k; i, j:= 1, 2*n+1;
          for k from 0 while j<>1 do i, j:= j, b(i, j) od; k
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 15 2015
  • Mathematica
    b[i_, j_] := Module[{m, r}, m = i+j; While[Mod[m, 2] == 0, r = Quotient[m, 2]; m = r]; m];
    a[n_] := Module[{i, j, k}, {i, j} = {1, 2*n+1}; For[k = 0, j != 1, {i, j} = {j, b[i, j]}; k++]; k];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 21 2025, after Alois P. Heinz *)

A246964 Limiting sequence of transformations when we start with the all 1's sequence a=A000012 and at step n>=0 replace a(n+a(n)) with Sum_{k=n..n+a(n)} a(k).

Original entry on oeis.org

1, 2, 1, 5, 1, 2, 1, 5, 10, 1, 2, 1, 23, 1, 2, 1, 5, 1, 39, 1, 2, 47, 50, 1, 2, 1, 5, 1, 2, 1, 5, 10, 1, 2, 1, 105, 1, 2, 1, 5, 1, 121, 1, 2, 129, 132, 1, 2, 1, 5, 1, 2, 1, 5, 10, 1, 2, 206, 432, 1, 2, 1, 5, 1, 449, 1, 2, 457, 889, 1, 2, 1, 820, 1, 2, 1, 5, 1
Offset: 0

Author

Floor van Lamoen, Mar 02 2015

Keywords

Examples

			Start . . . . . . . . . . . . . . . . .       : 1,1,1,1,1,...
Step 0: a(0+a(0)) = a(1)<- a(0)+a(1) = 2      : 1,2,1,1,1,...
Step 1: a(1+a(1)) = a(3)<- a(1)+a(2)+a(3) = 4 : 1,2,1,4,1,...
Step 2: a(2+a(2)) = a(3)<- a(2)+a(3) = 5      : 1,2,1,5,1,...
		

Programs

  • Maple
    mx:= 20000:  # maximal index needed
    b:= proc() 1 end:
    a:= proc(n) option remember; global mx; local t;
          if n<0 then 0 else a(n-1); t:= b(n);
            if n+t<= mx then b(n+t):= add(b(k), k=n..n+t) fi; t
          fi
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 04 2015
  • Mathematica
    mx = 20000; (* Maximal index needed *)
    b[_] = 1;
    a[n_] := a[n] = Module[{t}, If[n<0, 0, t = b[n]; If[n+t <= mx, b[n+t] = Sum[b[k], {k, n, n+t}]]; t]];
    a /@ Range[0, 100] (* Jean-François Alcover, Nov 13 2020, after Alois P. Heinz *)

A111024 Triangle read by rows: T(n,s), 0<=s

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Author

Floor van Lamoen, Oct 05 2005

Keywords

Examples

			1; 1,1; 1,1,1; 1,1,1,1; 1,1,1,1,1; 1,1,0,1,1,1
		

References

  • B. Gruenbaum, 'Points on lines' revisited, Nieuw Tijdschr. Wisk., 68 (1980-81), 209-213.
  • F. Heierman, Punten op lijnen, Nieuw Tijdschr. Wisk., 67 (1979-80) 113-120.

A113036 Number of solutions to +- 1 +- 2 +- .. +- n = 2.

Original entry on oeis.org

0, 0, 0, 1, 2, 0, 0, 8, 13, 0, 0, 69, 123, 0, 0, 719, 1313, 0, 0, 8215, 15260, 0, 0, 99774, 187615, 0, 0, 1264854, 2399207, 0, 0, 16544234, 31587644, 0, 0, 221625505, 425313967, 0, 0, 3025271756, 5829531261, 0, 0, 41929052284, 81066732018, 0
Offset: 0

Author

Floor van Lamoen, Oct 11 2005

Keywords

Crossrefs

Programs

  • Maple
    A113036:= proc(n) local i,j,p,t; t:= NULL; for j to n do p:=1; for i to j do p:=p*(x^(-i)+x^i); od; t:=t,coeff(p,x,2); od; t; end;
  • Mathematica
    nmax = 50; d = {1}; a1 = {};
    Do[
      i = Ceiling[Length[d]/2] + 2;
      AppendTo[a1, If[i > Length[d], 0, d[[i]]]];
      d = PadLeft[d, Length[d] + 2 n] + PadRight[d, Length[d] + 2 n];
      , {n, nmax}];
    a1 (* Ray Chandler, Mar 14 2014 *)

Formula

a(n) is the coefficient of x^2 in product(x^(-k)+x^k, k=1..n).

A113037 Number of solutions to +- 1 +- 2 +- .. +- n = 3.

Original entry on oeis.org

0, 0, 1, 0, 0, 3, 5, 0, 0, 23, 39, 0, 0, 219, 396, 0, 0, 2406, 4435, 0, 0, 28431, 53167, 0, 0, 353500, 667874, 0, 0, 4557831, 8675836, 0, 0, 60382450, 115601178, 0, 0, 816998489, 1571272955, 0, 0, 11242173783, 21701318843, 0, 0, 156841667096
Offset: 0

Author

Floor van Lamoen, Oct 11 2005

Keywords

Crossrefs

Programs

  • Maple
    A113037:= proc(n) local i,j,p,t; t:= NULL; for j to n do p:=1; for i to j do p:=p*(x^(-i)+x^i); od; t:=t,coeff(p,x,3); od; t; end;
  • Mathematica
    nmax = 50; d = {1}; a1 = {};
    Do[
      i = Ceiling[Length[d]/2] + 3;
      AppendTo[a1, If[i > Length[d], 0, d[[i]]]];
      d = PadLeft[d, Length[d] + 2 n] + PadRight[d, Length[d] + 2 n];
      , {n, nmax}];
    a1 (* Ray Chandler, Mar 14 2014 *)

Formula

a(n) is the coefficient of x^3 in product(x^(-k)+x^k, k=1..n).

A113044 Number of ways you can split the set of the first n primes into two proper subsets of which the sum of one is thrice the sum of the other.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 11, 0, 0, 0, 75, 0, 203, 0, 558, 0, 1559, 0, 0, 0, 12786, 0, 37147, 0, 108491, 0, 321551, 0, 964713, 0, 2904950, 0, 8775407, 0, 0, 0, 0, 0, 0, 0, 760875083, 0, 0, 0, 7272292133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2063638853745109
Offset: 1

Author

Floor van Lamoen, Oct 12 2005

Keywords

Crossrefs

Cf. A022894.

Programs

  • Maple
    A113044:=proc(n) local i,j,p,t; t:=0; for j from 2 to n do p:=1; for i to j do p:=p*(x^(-3*ithprime(i))+x^(ithprime(i))); od; t:=t,coeff(p,x,0); od; t; end;
    # second Maple program
    sp:= proc(n) option remember; `if` (n=1, 2, sp(n-1) +ithprime(n)) end: b:= proc() option remember; local i, j, t; `if` (args[1]=0, `if` (nargs=2, 1, b(args[t] $t=2..nargs)), add (`if` (args[j] -ithprime (args[nargs]) <0, 0, b(sort ([seq (args[i] -`if` (i=j, ithprime (args[nargs]), 0), i=1..nargs-1)])[], args[nargs]-1)), j=1..nargs-1)) end: a:= proc(n) local m; m:= sp(n); `if` (irem(m, 4)=0, b(m/4, 3*m/4, n), 0) end: seq (a(n), n=1..70); # Alois P. Heinz, Nov 02 2011
  • Mathematica
    d = {1}; nMax = 100; Lst = {};
    Do[
      p = Prime[n];
      d = PadLeft[d, Length[d] + 4 p] + PadRight[d, Length[d] + 4 p];
      AppendTo[Lst, d[[-Ceiling[Length[d]/4]]]];
      , {n, 1, nMax}];
    Lst(* Ray Chandler, Mar 09 2014 *)

Extensions

More terms from Alois P. Heinz, Nov 02 2011

A113445 Triangle T(n,k) read by rows: consider the sequence a(m) = a(m-1) + sum_{0

Original entry on oeis.org

1, 3, -1, 5, -6, 1, 7, -15, 11, -1, 9, -28, 38, -20, 1, 11, -45, 90, -90, 37, -1, 13, -66, 175, -260, 207, -70, 1, 15, -91, 301, -595, 707, -469, 135, -1, 17, -120, 476, -1176, 1862, -1848, 1052, -264, 1, 19, -153, 708, -2100, 4158, -5502, 4692, -2340, 521, -1
Offset: 0

Author

Floor van Lamoen, Nov 04 2005

Keywords

Comments

The sequence a(m) is also the expansion of (1-x^n)/(1-x-2x^n+x^{n+1}).
Instead of b(i) = a(n*i) one can take b(i) = a(n*i+p) for p=1..n-1.

Examples

			For n=5 (A113444) the recurrence relation is b(i) = 11b(i-1)-45b(i-2) +90b(i-3)-90b(i-4)+37b(i-5)-b(i-6), so the fifth row reads 11, -45, 90, -90, 37, -1.
		

Crossrefs

Columns k=0..2 give: A005408, -A000384, A007585(n-1) for n>=1. - Alois P. Heinz, Jul 16 2009

Programs

  • Maple
    T:= (n,k)-> (-1)^k /(k+1)! *(1+k +(n-k) *2^(k+1)) *mul (n+j-k, j=1..k):
    seq(seq(T(n,k), k=0..n), n=0..11);  # Alois P. Heinz, Jul 16 2009

Formula

From Alois P. Heinz, Jul 16 2009: (Start)
T(n,k) = (-1)^k/(k+1)! * (1+k+(n-k)*2^(k+1)) * Product_{j=1..k}(n+j-k).
G.f. of column k: (-1)^k * x^k * (1+(2^(k+1)-1)*x)/(1-x)^(k+2). (End)

Extensions

More terms from Alois P. Heinz, Jul 16 2009

A113722 A variant of Golomb's sequence using odd numbers: a(n) is the number of times 2*n+1 occurs, starting with a(1) = 1.

Original entry on oeis.org

1, 3, 5, 5, 5, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 21, 21, 21, 21, 21, 21, 21, 23, 23, 23, 23, 23, 23, 23, 23, 23, 25, 25, 25, 25, 25, 25, 25, 25, 25, 27
Offset: 0

Author

Floor van Lamoen and Paul D. Hanna, Nov 08 2005

Keywords

Comments

a(n) is taken to be the smallest number >= a(n-1) which is compatible with the description.

Examples

			Start with 1 in row 1 and form a triangle where row n is generated from row n-1 by the rule given in the description. Then row 2 will have (1) 3, row 3 will have (3) 5's, row 4 will have (5) 7's, (5) 9's and (5) 11's, etc.
The triangle begins:
1;
3;
5,5,5;
7,7,7,7,7,9,9,9,9,9,11,11,11,11,11; ...
The number of terms in each row (also row sums with offset) is given by A113723: [1,1,3,15,135,3845,769605,3821696361,...].
		

Crossrefs

Cf. A001462 (Golomb's sequence), A113723, A113724, A113676.

Programs

  • PARI
    a=[1,3,5,5,5];for(n=3,20, for(i=1,a[n],a=concat(a,2*n+1)));a

A113723 The number of terms in row n of A113722 when interpreted as a triangle.

Original entry on oeis.org

1, 1, 3, 15, 135, 3845, 769605, 3821696361
Offset: 1

Author

Floor van Lamoen and Paul D. Hanna, Nov 08 2005

Keywords

Comments

A113722 is a variant of Golomb's sequence using odd numbers: a(n) is the number of times 2*n+1 occurs, starting with a(1) = 1.

Crossrefs

Cf. A001462 (Golomb's sequence), A113722, A113724, A113725, A113676.