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

A082008 a(n) = A082007(n-1) + 1.

Original entry on oeis.org

1, 2, 3, 4, 7, 10, 13, 5, 6, 8, 9, 11, 12, 14, 15, 16, 31, 46, 61, 76, 91, 106, 121, 136, 151, 166, 181, 196, 211, 226, 241, 17, 18, 32, 33, 47, 48, 62, 63, 77, 78, 92, 93, 107, 108, 122, 123, 137, 138, 152, 153, 167, 168, 182, 183, 197, 198
Offset: 1

Views

Author

N. J. A. Sloane, Oct 06 2009, based on a posting by Steve Witham (sw(AT)tiac.net) to the Math Fun Mailing List, Sep 30 2009

Keywords

Comments

From Steve Witham (sw(AT)tiac.net), Oct 13 2009: (Start)
Starting the sequence (and its index) at 1 (as in A082008) instead of 0 (as in A082007) seems more natural. This was conceived as a way to arrange a heapsort in memory to improve locality of reference. The classic Williams/Floyd heapsort also works a little more naturally when the origin is 1.
This sequence is a permutation of the integers >= 1. (End)
Moreover, the first 2^2^n - 1 terms are a permutation of the first 2^2^n - 1 positive integers. - Ivan Neretin, Mar 12 2017

Programs

  • Mathematica
    w = {{1}}; Do[k = 2^Floor@Log2[n - 1]; AppendTo[w, Flatten@Table[w[[n - k]] + (2^k - 1) i, {i, 2^k}]], {n, 2, 7}]; a = Flatten@w (* Ivan Neretin, Mar 12 2017 *)
  • Python
    def A082008( n ):
        if n == 1: return 1
        y = 2 ** int( log( n, 2 ) )
        yc = 2 ** 2 ** int( log( log( y, 2 ), 2 ) )
        yr = y // yc
        return (yc-1) * int( (n-y) / yr + 1 ) + A082008( yr + n % yr )
    # Steve Witham (sw(AT)tiac.net), Oct 13 2009

Extensions

The origin is 1 Steve Witham (sw(AT)tiac.net), Oct 13 2009

A082009 a(n) is the label of parent node of node n in tree shown in A082007.

Original entry on oeis.org

0, 0, 1, 3, 3, 1, 6, 6, 2, 9, 9, 2, 12, 12, 4, 15, 15, 16, 18, 18, 16, 21, 21, 17, 24, 24, 17, 27, 27, 4, 30, 30, 31, 33, 33, 31, 36, 36, 32, 39, 39, 32, 42, 42, 5, 45, 45, 46, 48, 48, 46, 51, 51, 47, 54, 54, 47, 57, 57, 5, 60, 60, 61, 63
Offset: 1

Views

Author

N. J. A. Sloane, Oct 06 2009, based on a posting by Steve Witham (sw(AT)tiac.net) to the Math Fun Mailing List, Sep 30 2009

Keywords

Programs

  • Mathematica
    w = {{0}}; a = ConstantArray[0, 254]; Do[k = 2^Floor@Log2[n - 1]; AppendTo[w, Flatten@Table[w[[n - k]] + (2^k - 1) i, {i, 2^k}]]; a[[w[[-1]]]] = Riffle[#, #] &@w[[-2]], {n, 2, 8}]; a (* Ivan Neretin, Mar 12 2017 *)

A082006 In the following square array numbers (not occurring earlier) are entered like this: a(1, 1), a(1, 2), a(2, 1), a(3, 1), a(2, 2), a(1, 3), a(1, 4), a(2, 3), a(3, 2), a(4, 1), a(5, 1), a(4, 2), ... such that every entry is coprime to the members of the row and column it belongs, with the condition that the n-th diagonal sum is a multiple of n. 1 2 7 9 31 25... 4 5 11 23 27... 3 13 8... 19 21... 17 ... ... Sequence contains numbers as they are entered.

Original entry on oeis.org

1, 2, 4, 3, 5, 7, 9, 11, 13, 19, 17, 21, 8, 23, 31, 25, 27, 29, 37, 41
Offset: 1

Views

Author

Amarnath Murthy, Apr 05 2003

Keywords

Comments

Next term T(6,1) =a(21)> 500000, a(21) is odd. The sum of the first diagonal is 1 (a multiple of 1). The sum of the second diagonal is T(1,2)+T(2,1)=2+4=6 (a multiple of 2). The sum of the 3rd diagonal is T(1,3)+T(2,2)+T(3,1)=7+5+3=15 (a multiple of 3). The sum of the 4th diagonal is T(1,4)+T(2,3)+T(3,2)+T(4,1)=9+11+13+19=52 (a multiple of 4). The members of the first row (1,2,7,9,31,25,..) are mutually coprime. The members of the 2nd row (4,5,11,23,27,..) are mutually coprime. The members of the first column (1,4,3,19,17,..) are mutually coprime. The members of the 2nd column (2,5,13,21,..) are mutually coprime. The a(n) transverses the table in meandering fashion: first diagonal up, 2nd diagonal down, 3rd diagonal up, 4th down etc. - R. J. Mathar, May 06 2006
From Alois P. Heinz, Oct 06 2009: (Start)
T(6,1) is undefined, so there are no further terms.
For T(6,1) would be == 3 (mod 6) w.r.t. antidiagonal 6, (T(6,1)+159=6k) and it would be == 1 or == 5 (mod 6) w.r.t. column 1 (coprime to 3 & 4) which is impossible, unless backtracking is allowed and earlier elements are altered. But that is not intended by the author, because "sequence contains numbers as they are entered", and it would not make a valid definition at all. (End)

Examples

			Table is
1 2 7 9 31 25
4 5 11 23 27
3 13 8 29
19 21 37
17 41
?
		

Crossrefs

Extensions

More terms from R. J. Mathar, May 06 2006
Showing 1-3 of 3 results.