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.

User: Ed Smiley

Ed Smiley's wiki page.

Ed Smiley has authored 3 sequences.

A226502 Let P(k) denote the k-th prime (P(1)=2, P(2)=3 ...); a(n) = P(n+1)P(n+3) - P(n)P(n+2).

Original entry on oeis.org

11, 34, 36, 96, 60, 144, 160, 162, 360, 198, 320, 336, 352, 494, 460, 720, 378, 560, 718, 450, 972, 1020, 938, 1002, 816, 420, 864, 1752, 960, 2596, 810, 2204, 576, 2404, 1220, 1606, 1980, 1694, 1420, 2876, 744, 2694, 780, 3160, 2810, 3520, 3170, 1824, 1840, 1422, 3836
Offset: 1

Author

Ed Smiley, Jun 09 2013

Keywords

Comments

Differences of the products of alternate primes.

Crossrefs

First differences of A090076.

Programs

  • Mathematica
    #[[2]]#[[4]]-#[[1]]#[[3]]&/@Partition[Prime[Range[60]],4,1] (* Harvey P. Dale, Jul 14 2025 *)
  • PARI
    p=2;q=3;r=5;forprime(s=7,1e2,print1(q*s-p*r", ");p=q;q=r;r=s) \\ Charles R Greathouse IV, Jun 10 2013

Formula

a(n) >> n log n and this is probably sharp: on Dickson's conjecture there are infinitely many a(n) < kn log n for any k > 4. The constant 4 comes from 8 + 2 - 6 - 0 n the prime quadruplet (p+0, p+2, p+6, p+8). On Cramér's conjecture a(n) = O(n log^3 n). Unconditionally a(n) << n^1.525 log n. - Charles R Greathouse IV, Jun 10 2013

A182664 a(n) = A088828(n) + A157502(n).

Original entry on oeis.org

5, 11, 15, 21, 25, 29, 35, 39, 43, 47, 53, 57, 61, 65, 69, 75, 79, 83, 87, 91, 95, 101, 105, 109, 113, 117, 121, 125, 131, 135, 139, 143, 147, 151, 155, 159, 165, 169, 173, 177, 181, 185, 189, 193, 197, 203, 207, 211, 215, 219, 223, 227, 231, 235, 239, 245
Offset: 1

Author

Ed Smiley, Dec 23 2012

Keywords

Crossrefs

Cf. A088828 and A157502. Also alternate generation formula related to A000217, A010054.

Programs

  • Mathematica
    Module[{nn=60,tb},tb=2*Accumulate[Table[If[IntegerQ[(Sqrt[8n+1]-1)/2],1,0],{n,nn}]];Join[{5},Table[1+4i+tb[[i-1]],{i,2,nn}]]] (* Harvey P. Dale, Jul 22 2013 *)

Formula

Let T(n) be 1 if positive n is a triangular number, else 0; we also define T(0) as 0. Then we can also write this sequence as 1 + 4*n + 2*[T(1) + T(2) ... T(n-1)]. (Other than the special definition for T(0), T(n) is essentially A010054.)
The sequence can also be seen visually as
1 + 4
1 + 4 + 6
1 + 4 + 6 + 4
1 + 4 + 6 + 4 + 4
1 + 4 + 6 + 4 + 4 + 6
1 + 4 + 6 + 4 + 4 + 6 + 4
1 + 4 + 6 + 4 + 4 + 6 + 4 + 4
1 + 4 + 6 + 4 + 4 + 6 + 4 + 4 + 4
1 + 4 + 6 + 4 + 4 + 6 + 4 + 4 + 4 + 6...

A001099 a(n) = n^n - a(n-1), with a(1) = 1.

Original entry on oeis.org

1, 3, 24, 232, 2893, 43763, 779780, 15997436, 371423053, 9628576947, 275683093664, 8640417354592, 294234689237661, 10817772136320355, 427076118244539020, 18019667955465012596, 809220593930871751581, 38537187481365665823843, 1939882468178947923300136
Offset: 1

Author

Keywords

Crossrefs

Cf. A001923.

Programs

  • Mathematica
    Abs[Table[Sum[k^k*(-1)^(k+1),{k,1,n}],{n,1,30}]] (* Alexander Adamchuk, Jun 30 2006 *)
    RecurrenceTable[{a[1]==1,a[n]==n^n-a[n-1]},a,{n,20}] (* Harvey P. Dale, Jan 21 2015 *)
  • Python
    from itertools import accumulate, count, islice
    def A001099_gen(): # generator of terms
        yield from accumulate((k**k for k in count(1)),func=lambda x,y:y-x)
    A001099_list = list(islice(A001099_gen(),20)) # Chai Wah Wu, Jun 17 2022

Formula

Absolute value of Sum_{k=1..n} k^k*(-1)^(k+1). a(n) = n^n - (n-1)^(n-1) + (n-2)^(n-2) - ... - (-1)^n*1^1. - Alexander Adamchuk, Jun 30 2006