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.

A049039 Geometric Connell sequence: 1 odd, 2 even, 4 odd, 8 even, ...

Original entry on oeis.org

1, 2, 4, 5, 7, 9, 11, 12, 14, 16, 18, 20, 22, 24, 26, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 121, 123, 125
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A337300 (partial sums), A043529 (first differences).
Cf. A160464, A160465 and A160473. - Johannes W. Meijer, May 24 2009

Programs

  • Haskell
    a049039 n k = a049039_tabl !! (n-1) !! (k-1)
    a049039_row n = a049039_tabl !! (n-1)
    a049039_tabl = f 1 1 [1..] where
       f k p xs = ys : f (2 * k) (1 - p) (dropWhile (<= last ys) xs) where
         ys  = take k $ filter ((== p) . (`mod` 2)) xs
    -- Reinhard Zumkeller, Jan 18 2012, Jul 08 2011
    
  • Maple
    Digits := 100: [seq(2*n-1-floor(evalf(log(n)/log(2))), n=1..100)];
  • Mathematica
    a[0] = 0; a[n_?EvenQ] := a[n] = a[n/2]+n-1; a[n_?OddQ] := a[n] = a[(n-1)/2]+n; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Dec 27 2011, after Ralf Stephan *)
  • PARI
    a(n) = n<<1 - 1 - logint(n,2); \\ Kevin Ryde, Feb 12 2022
    
  • Python
    def A049039(n): return (n<<1)-n.bit_length() # Chai Wah Wu, Aug 01 2022

Formula

a(n) = 2n - 1 - floor(log_2(n)).
a(2^n-1) = 2^(n+1) - (n+2) = A000295(n+1), the Eulerian numbers.
a(0)=0, a(2n) = a(n) + 2n - 1, a(2n+1) = a(n) + 2n + 1. - Ralf Stephan, Oct 11 2003

Extensions

Keyword tabf added by Reinhard Zumkeller, Jan 22 2012

A014630 Distinct elements occurring in triangle of Eulerian numbers (unsorted).

Original entry on oeis.org

1, 4, 11, 26, 66, 57, 302, 120, 1191, 2416, 247, 4293, 15619, 502, 14608, 88234, 156190, 1013, 47840, 455192, 1310354, 2036, 152637, 2203488, 9738114, 15724248, 4083, 478271, 10187685, 66318474, 162512286, 8178, 1479726, 45533450, 423281535, 1505621508, 2275172004
Offset: 1

Views

Author

Keywords

Comments

It appears that no term other than 1 appears on different rows of A008292. If so, row n contains floor((n-1)/2) terms for n >= 2. - Pontus von Brömssen, Jul 20 2024

Examples

			As an irregular triangle:
   n\k|     1       2         3          4           5           6
  ----+-----------------------------------------------------------
   1  |     1
   2  |     (no terms)
   3  |     4
   4  |    11
   5  |    26      66
   6  |    57     302
   7  |   120    1191      2416
   8  |   247    4293     15619
   9  |   502   14608     88234     156190
  10  |  1013   47840    455192    1310354
  11  |  2036  152637   2203488    9738114    15724248
  12  |  4083  478271  10187685   66318474   162512286
  13  |  8178 1479726  45533450  423281535  1505621508  2275172004
  14  | 16369 4537314 198410786 2571742175 12843262863 27971176092
		

Crossrefs

Extensions

More terms from James Sellers

A065050 Prime numbers in the triangle of Eulerian numbers.

Original entry on oeis.org

11, 1013, 15619, 16369, 65519, 478271, 13824739, 67108837, 1125899906842573, 72057594037927879, 1180591620717411303353, 2153693845981967454679177, 12086992684284175368032851, 22528399544594441658590663774175461
Offset: 1

Views

Author

Henry Bottomley, Nov 06 2001

Keywords

Examples

			Pairs (n, k) such that Eulerian(n, k) is prime are (4, 2), (10, 2), (8, 4), (14, 2), (16, 2), (12, 3), (15, 3), (26, 2), (50, 2), (56, 2), (70, 2), (51, 3), (27, 9), (72, 3), (116, 2), (87, 3), (183, 3).
		

Crossrefs

Programs

  • PARI
    Eulerian(n,k)=sum(j=0,k,(-1)^j*(k-j)^n*binomial(n+1,j));
    lista(nn) = {my(list=List()); for (n=1, nn, for (k=1, n, if (ispseudoprime(p=Eulerian(n, k)), listput(list, p)););); Vec(Set(list));} \\ Michel Marcus, May 25 2022

Extensions

More terms from Randall L Rathbun, Jan 21 2002
Showing 1-3 of 3 results.