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.

A229738 a(n) = p^2*(p^2+2*p-1)/2, where p = prime(n).

Original entry on oeis.org

14, 63, 425, 1519, 8591, 16393, 46529, 71839, 151823, 377609, 491071, 987049, 1480961, 1787983, 2542559, 4092713, 6262319, 7148041, 10374079, 13061231, 14585473, 19964959, 24297503, 32072129, 45172609, 53055401, 57362863, 66759119, 71868169, 82960193, 132112639, 149489471, 178699649, 189326479, 249739049
Offset: 1

Views

Author

N. J. A. Sloane, Oct 05 2013

Keywords

Crossrefs

Programs

  • Magma
    [p^2*(p^2+2*p-1)/2: p in PrimesUpTo(200)]; // Bruno Berselli, Oct 07 2013
    
  • Mathematica
    Table[Prime[n]^2 (Prime[n]^2 + 2 Prime[n] - 1)/2, {n, 40}] (* Bruno Berselli, Oct 07 2013 *)
    #^2 (#^2+2#-1)/2&/@Prime[Range[40]] (* Harvey P. Dale, Mar 13 2017 *)
  • PARI
    a(n)=p=prime(n);p^2*(p^2+2*p-1)/2 \\ Anders Hellström, Sep 04 2015
    
  • PARI
    lista(nn) = forprime(p=2, nn, print1(p^2*(p^2+2*p-1)/2, ", ")); \\ Michel Marcus, Sep 04 2015

A345018 For each n, append to the sequence n^2 consecutive integers, starting from n.

Original entry on oeis.org

1, 2, 3, 4, 5, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41
Offset: 1

Views

Author

Paolo Xausa, Jun 05 2021

Keywords

Comments

Irregular triangle read by rows T(n,k) in which row n lists the integers from n to n + n^2 - 1, with n >= 1.

Examples

			Written as an irregular triangle T(n,k) the sequence begins:
  n\k|  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16 ...
  ---+---------------------------------------------------------------
   1 |  1;
   2 |  2,  3,  4,  5;
   3 |  3,  4,  5,  6,  7,  8,  9, 10, 11;
   4 |  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19;
  ...
		

Crossrefs

Column 1: A000027.
Right border: A028387.
Row lengths: A000290.
Row sums: A255499.

Programs

  • Maple
    T:= n-> (t-> seq(n+i, i=0..t-1))(n^2):
    seq(T(n), n=1..6);  # Alois P. Heinz, Nov 05 2024
  • Mathematica
    Table[Range[n,n^2+n-1],{n,6}] (* Paolo Xausa, Sep 05 2023 *)
  • PARI
    row(n) = vector(n^2, k, n+k-1); \\ Michel Marcus, Jun 08 2021
    
  • Python
    from sympy import integer_nthroot
    def A345018(n): return n-1+(k:=(m:=integer_nthroot(3*n,3)[0])+(6*n>m*(m+1)*((m<<1)+1)))*(k*(3-(k<<1))+5)//6 # Chai Wah Wu, Nov 05 2024

Formula

T(n,k) = n + k - 1, with n >= 1 and 1 <= k <= n^2.
Showing 1-2 of 2 results.