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

A013942 Triangle of numbers T(n,k) = floor(2n/k), k=1..2n, read by rows.

Original entry on oeis.org

2, 1, 4, 2, 1, 1, 6, 3, 2, 1, 1, 1, 8, 4, 2, 2, 1, 1, 1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 12, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 14, 7, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 16, 8, 5, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 18, 9, 6, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 10, 6, 5, 4, 3
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the leading term in period of continued fraction for n-th nonsquare.
Row A026741(n) contains n and all rows with a smaller row number do not contain n. - Reinhard Zumkeller, Jun 04 2013

Examples

			First four rows:
  2 1
  4 2 1 1
  6 3 2 1 1 1
  8 4 2 2 1 1 1 1
  ...
		

Crossrefs

Cf. A010766.
Cf. A005843 (row lengths and left edge), A062550 (row sums).

Programs

  • Haskell
    a013942 n k = a013942_tabf !! (n-1) !! (k-1)
    a013942_row n = map (div (n * 2)) [1 .. 2 * n]
    a013942_tabf = map a013942_row [1 ..]
    -- Reinhard Zumkeller, Jun 04 2013
    
  • Mathematica
    f[n_,h_]:=FractionalPart[(n^2+h)^(1/2)];
    g[n_,h_]:=Floor[1/f[n,h]];
    TableForm[Table[g[n,h],{n,1,13},{h,1,2n}]]
  • PARI
    T(n, k) = 2*n\k;
    tabf(nn) = for (n=1, nn, for (k=1, 2*n, print1(T(n,k), ", ")); print()); \\ Michel Marcus, Sep 30 2016

Formula

T(n,k) = floor(2n/k), k=1,...,2n.
T(n,k) = [1/{sqrt(k+n^2)}], k=1,2,...,2n, {}=fractional part, []=floor.

Extensions

Keyword tabl replaced by tabf and missing a(90)=1 inserted by Reinhard Zumkeller, Jun 04 2013

A158568 a(n) = Sum_{i=1..Fibonacci(n)} sigma_0(i) where sigma_0(n) is A000005(n).

Original entry on oeis.org

1, 1, 3, 5, 10, 20, 37, 70, 127, 231, 413, 746, 1307, 2295, 4010, 6957, 12031, 20712, 35514, 60718, 103500, 175989, 298539, 505399, 853777, 1439856, 2424299, 4075479, 6841787, 11470592, 19207624, 32126763, 53678285
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 21 2009

Keywords

Crossrefs

Programs

  • Maple
    with(combinat):with(numtheory): A158568 := proc(n) return add(tau(i),i=1..fibonacci(n)): end: seq(A158568(n),n=1..20); # Nathaniel Johnston, May 09 2011
  • Mathematica
    Module[{nn=33,f,d},f=Fibonacci[nn];d=DivisorSigma[0,Range[f]];Table[ Total[ Take[d,n]],{n,Fibonacci[Range[nn]]}]] (* Harvey P. Dale, Apr 29 2018 *)
  • PARI
    a(n) = sum(k=1, fibonacci(n), numdiv(k)); \\ Michel Marcus, Feb 12 2019
    
  • Python
    from math import isqrt
    def A153568(n):
        a, b, = 0, 1
        for _ in range(n): a, b = b, a+b
        return (lambda m: 2*sum(a//k for k in range(1, m+1))-m*m)(isqrt(a)) # Chai Wah Wu, Oct 09 2021

Extensions

a(16)-a(33) from Nathaniel Johnston, May 09 2011
Showing 1-2 of 2 results.