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

A099506 a(1)=1; for n > 1, a(n)=smallest m>0 that has not appeared so far in the sequence such that m+a(n-1) is a multiple of n.

Original entry on oeis.org

1, 3, 6, 2, 8, 4, 10, 14, 13, 7, 15, 9, 17, 11, 19, 29, 5, 31, 26, 34, 50, 16, 30, 18, 32, 20, 61, 23, 35, 25, 37, 27, 39, 63, 42, 66, 45, 69, 48, 72, 51, 33, 53, 79, 56, 36, 58, 38, 60, 40, 62, 94, 12, 96, 124, 44, 70, 46, 131, 49, 73, 113, 76, 52, 78, 54, 80, 192, 84, 126, 87
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Oct 20 2004

Keywords

Examples

			a(1)=1 by definition.
a(2)=3 because then a(2)+a(1)=3+1=4 which is a multiple of 2. a(2) cannot be 1 (which would lead to a sum of 2) because this has already appeared.
Likewise, a(3)=6 so that a(3)+a(2)=6+3=9 which is a multiple of 3.
a(4)=2 so that a(4)+a(3)=2+6=8 and so on.
		

Crossrefs

Cf. A099507 for positions of occurrences of integers in this sequence.
Cf. A125717.

Programs

  • MATLAB
    N = 100;
    M = 10*N;  % find a(1) to a(N) or until a(n) > M
    B = zeros(1,M);
    A = zeros(1,N);
    mmin = 2;
    A(1) = 1;
    B(1) = 1;
    for n = 2:N
      for m = mmin:M
        if mmin == m && B(m) == 1
           mmin = mmin+1;
        elseif B(m) == 0 && rem(m + A(n-1),n) == 0
          A(n) = m;
          B(m) = 1;
          if m == mmin
             mmin = mmin + 1;
          end;
          break
        end;
      end;
      if A(n) == 0
         break
      end
    end;
    if A(n) == 0
      A(1:n-1)
    else
      A
    end; % Robert Israel, Jun 17 2015
  • PARI
    v=[1];n=1;while(n<100,s=n+v[#v];if(!(s%(#v+1)||vecsearch(vecsort(v),n)),v=concat(v,n);n=0);n++);v \\ Derek Orr, Jun 16 2015
    

A099518 RECORDS transform of A099506.

Original entry on oeis.org

1, 3, 6, 8, 10, 14, 15, 17, 19, 29, 31, 34, 50, 61, 63, 66, 69, 72, 79, 94, 96, 124, 131, 192, 225, 300, 353, 399, 433, 623, 632, 636, 795, 799, 806, 813, 1027, 1092, 1419, 1436, 1440, 1448, 1483, 1875, 2236, 2244, 2450, 2494, 2776, 2827, 3253, 3494, 4113, 4491
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Oct 20 2004

Keywords

Examples

			A099506 starts with: 1,3,6,2,8,4,10,14,13,7,15,... so the records are 1,3,6,8,10,14,15,...
		

Crossrefs

A099519 Positions in A099506 of the values in the RECORDS transform of that sequence (A099518).

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 11, 13, 15, 16, 18, 20, 21, 27, 34, 36, 38, 40, 44, 52, 54, 55, 59, 68, 101, 108, 128, 181, 197, 224, 281, 283, 288, 359, 363, 367, 368, 493, 510, 643, 645, 649, 665, 676, 800, 804, 876, 892, 990, 1008, 1017, 1250, 1476, 1614, 1676, 2140, 2286
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Oct 20 2004

Keywords

Examples

			Sequence A099506 is 1,3,6,2,8,4,10,14,13,7,15,... so the records are (A099518) 1,3,6,8,10,14,15,... which appear in positions 1,2,3,5,7,8,11,....
		

Crossrefs

Formula

A099506(a(n))=A099518(n).

A099521 a(n) is such that A099520(a(n))=n.

Original entry on oeis.org

1, 2, 5, 3, 4, 9, 6, 11, 54, 8, 7, 10, 19, 12, 72, 21, 14, 23, 84, 16, 25, 13, 18, 29, 15, 22, 33, 17, 26, 37, 156, 28, 39, 30, 41, 190, 32, 45, 34, 47, 218, 36, 51, 20, 40, 57, 42, 59, 27, 44, 24, 46, 284, 48, 286, 31, 50, 292, 52, 77, 300, 79, 35, 81, 85, 56, 87, 58, 89, 60
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Oct 20 2004

Keywords

Examples

			Gives the positions in the sequence A099520 at which the integers n>0 appear. A099520 begins: 1,2,4,5,3,7,11,10,6,12,8,..., so the positions of the integers are: 1,2,5,3,4,9,6,...
		

Crossrefs

Cf. A099520. Also A099506 and A099507 for sequences based on a slightly different definition.
Showing 1-4 of 4 results.