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.

Previous Showing 11-16 of 16 results.

A324792 First differences of A325056: distance in A076042 from n-th low point to the next.

Original entry on oeis.org

5, 5, 9, 15, 25, 45, 77, 133, 231, 401, 693, 1201, 2081, 3603, 6241, 10809, 18723, 32429, 56169, 97287, 168505, 291861, 505517, 875581, 1516551, 2626743, 4549653, 7880231, 13648959, 23640691, 40946879, 70922073, 122840635, 212766221, 368521905, 638298663
Offset: 0

Views

Author

N. J. A. Sloane, Sep 04 2019

Keywords

Crossrefs

If we use primes instead of squares we get A008348, A309226, A324782, A324783.

Programs

  • Mathematica
    a=b=c=d=n=0; L={0}; While[Length[L] < 22, n++; a=b; b=c; c=d; d=c + If[c < n^2, n^2, -n^2]; If[a > b < c < d, AppendTo[L, n-2]]]; Differences@ L (* Giovanni Resta, Oct 01 2019 *)

Extensions

More terms from Giovanni Resta, Oct 01 2019

A325056 Index of n-th low point in A076042.

Original entry on oeis.org

0, 5, 10, 19, 34, 59, 104, 181, 314, 545, 946, 1639, 2840, 4921, 8524, 14765, 25574, 44297, 76726, 132895, 230182, 398687, 690548, 1196065, 2071646, 3588197, 6214940, 10764593, 18644824, 32293783, 55934474, 96881353, 167803426, 290644061, 503410282, 871932187
Offset: 0

Views

Author

N. J. A. Sloane, Sep 04 2019

Keywords

Crossrefs

If we use primes instead of squares we get A008348, A309226, A324782, A324783.

Programs

  • Maple
    See A324791.
  • Mathematica
    a=b=c=d=n=0; L={0}; While[Length[L] < 22, n++; a=b; b=c; c=d; d=c + If[c < n^2, n^2, -n^2]; If[a > b < c < d, AppendTo[L, n - 2]]]; L (* Giovanni Resta, Oct 01 2019 *)
  • PARI
    \\ See PARI program in A076042.

Extensions

a(14)-a(17) added by N. J. A. Sloane, Sep 30 2019
More terms from Giovanni Resta, Oct 01 2019
Modified definition to make offset 0. - N. J. A. Sloane, Oct 02 2019

A309222 a(0) = 6; thereafter a(n) = a(n-1) + prime(n) if prime(n) > a(n-1), otherwise a(n) = a(n-1) - prime(n).

Original entry on oeis.org

6, 4, 1, 6, 13, 2, 15, 32, 13, 36, 7, 38, 1, 42, 85, 38, 91, 32, 93, 26, 97, 24, 103, 20, 109, 12, 113, 10, 117, 8, 121, 248, 117, 254, 115, 264, 113, 270, 107, 274, 101, 280, 99, 290, 97, 294, 95, 306, 83, 310, 81, 314, 75, 316, 65, 322, 59, 328, 57, 334, 53, 336, 43, 350, 39, 352
Offset: 0

Views

Author

N. J. A. Sloane, Aug 29 2019

Keywords

Comments

Hugo van der Sanden asks if this ever reaches 0. He finds that a(n) > 0 for n < 5*10^10. Probabilistic arguments suggest it will never reach 0.

References

  • Hugo van der Sanden, Posting to Sequence Fans Mailing List, Aug 28 2019

Crossrefs

If we start with 0 or 1 instead of 6 we get A008348, A022837.
Similar in spirit to A008344, and has a similar graph.

A330725 a(0) = 0; thereafter a(n) = a(n-1) + sigma(n) if sigma(n) > a(n-1), otherwise a(n) = a(n-1) - sigma(n), where sigma is the sum of divisors function A000203.

Original entry on oeis.org

0, 1, 4, 0, 7, 1, 13, 5, 20, 7, 25, 13, 41, 27, 3, 27, 58, 40, 1, 21, 63, 31, 67, 43, 103, 72, 30, 70, 14, 44, 116, 84, 21, 69, 15, 63, 154, 116, 56, 0, 90, 48, 144, 100, 16, 94, 22, 70, 194, 137, 44, 116, 18, 72, 192, 120, 0, 80, 170, 110, 278, 216, 120, 16
Offset: 0

Views

Author

Alois P. Heinz, Jan 11 2020

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, ((s, t)-> s+
          `if`(s
    				
  • Mathematica
    nxt[{n_,a_}]:={n+1,If[DivisorSigma[1,n+1]>a,a+DivisorSigma[1,n+1],a- DivisorSigma[ 1,n+1]]}; NestList[nxt,{0,0},70][[All,2]] (* Harvey P. Dale, May 14 2022 *)

A331165 a(n) = a(n-1) + p(n) if p(n) > a(n-1), otherwise a(n) = a(n-1) - p(n), where p is the partition function A000041 (assuming a(n) = 0 for n < 0).

Original entry on oeis.org

1, 0, 2, 5, 0, 7, 18, 3, 25, 55, 13, 69, 146, 45, 180, 4, 235, 532, 147, 637, 10, 802, 1804, 549, 2124, 166, 2602, 5612, 1894, 6459, 855, 7697, 16046, 5903, 18213, 3330, 21307, 42944, 16929, 48114, 10776, 55359, 2185, 65446, 140621, 51487, 157045, 32291, 179564
Offset: 0

Views

Author

Alois P. Heinz, Jan 11 2020

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<0, 0, ((s, t)-> s+
         `if`(s
    				
  • Mathematica
    a[n_] := a[n] = If[n<0, 0, With[{a1 = a[n-1], p = PartitionsP[n]}, If[p>a1, a1 + p, a1 - p]]];
    a /@ Range[0, 70] (* Jean-François Alcover, Jan 05 2021 *)
  • PARI
    lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, my(p = numbpart(n-1)); va[n] = va[n-1] - p; if (va[n] < 0, va[n] += 2*p);); va;} \\ Michel Marcus, Jan 06 2021

A022836 a(n) = c(1)*p(0) + ... + c(n)*p(n-1), where c(i) = 1 if a(i-1) <= p(i-1) and c(i) = -1 if a(i-1) > p(i-1) (with p(0) = 1 and p(i) a prime for i >= 1).

Original entry on oeis.org

1, 3, 6, 1, 8, 19, 6, 23, 4, 27, 56, 25, 62, 21, 64, 17, 70, 11, 72, 5, 76, 3, 82, 165, 76, 173, 72, 175, 68, 177, 64, 191, 60, 197, 58, 207, 56, 213, 50, 217, 44, 223, 42, 233, 40, 237, 38, 249, 26, 253, 24, 257, 18, 259, 8, 265, 2, 271, 542, 265, 546, 263, 556
Offset: 0

Views

Author

Keywords

Comments

Alternate description: a(1) = 1, a(n) = a(n-1) - prime(n) if a(n-1) > prime(n) else a(n) = a(n-1) + prime(n). - Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 27 2003

Programs

  • Mathematica
    nxt[{n_,a_}]:=Module[{p=Prime[n]},{n+1,If[a>p,a-p,a+p]}]; NestList[ nxt,{1,1},70][[All,2]] (* Harvey P. Dale, Nov 27 2016 *)

Formula

a(n) = A008348(n) + 1.

Extensions

Name corrected by Sean A. Irvine, May 22 2019
Previous Showing 11-16 of 16 results.