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

A324782 Value of A008348 at its n-th low point (A309226).

Original entry on oeis.org

0, 0, 3, 2, 1, 2, 3, 2, 7, 2, 17, 26, 1, 0, 27, 6, 17, 0, 7, 6, 47, 38, 53, 38, 25, 8, 19, 2, 37
Offset: 0

Views

Author

N. J. A. Sloane, Sep 01 2019

Keywords

Comments

a(n) = A008348(A309226).

Crossrefs

Cf. A008348.
See A309226 for more information.

Programs

Extensions

a(17)-a(28) from Giovanni Resta, Oct 02 2019
Modified definition to make offset 0. - N. J. A. Sloane, Oct 02 2019

A324783 First differences of A309226: distances in A008348 from n-th low point to the next.

Original entry on oeis.org

3, 5, 13, 35, 89, 221, 579, 1561, 4127, 11143, 30745, 84585, 235913, 659385, 1851883, 5220661, 14776197, 41946423, 119451363, 341007809, 975932453, 2798620993, 8041115863, 23145844263, 66733786153, 192697084389, 557206314727, 1613334811187
Offset: 0

Views

Author

N. J. A. Sloane, Sep 01 2019

Keywords

Comments

Also (essentially) the first differences of A135025.
See A309226 for more information.

Crossrefs

Programs

Extensions

a(16)-a(27) from Giovanni Resta, Oct 02 2019
Modified definition to make offset 0. - N. J. A. Sloane, Oct 02 2019

A324784 Indices of low points in Recamán's sequence A005132 (see Comments in A309226 for definition).

Original entry on oeis.org

0, 4, 16, 31, 64, 99, 111, 131, 170, 187, 222, 285, 337, 403, 450, 508, 674, 754, 770, 843, 983, 1227, 1302, 1345, 1409, 1712, 1974, 2063, 2087, 2142, 2336, 2418, 2492, 2622, 2652, 2867, 3083, 3867, 4135, 4493, 4596, 4645, 4791, 4825, 5024, 5240, 5896, 6528, 7072, 7564, 7673, 8102
Offset: 1

Views

Author

N. J. A. Sloane, Sep 01 2019

Keywords

Crossrefs

A135025 Let b(1) = 2; and for n>= 2, if b(n-1) < prime(n) then b(n) = b(n-1) + prime(n) otherwise b(n) = b(n-1) - prime(n). The sequence gives the indices n where b(n-1) < b(n) < b(n+1).

Original entry on oeis.org

4, 9, 22, 57, 146, 367, 946, 2507, 6634, 17777, 48522, 133107, 369020, 1028405, 2880288, 8100949, 22877146, 64823569, 184274932, 525282741, 1501215194, 4299836187, 12340952050, 35486796313, 102220582466, 294917666855, 852123981582, 2465458792769
Offset: 1

Views

Author

Lior Deutsch (liorde(AT)gmail.com), Feb 10 2008

Keywords

Comments

The b sequence, prefixed by 0, is A008348. The low points in b are 1 less than the terms of the present sequence, and are given in A309226. - N. J. A. Sloane, Aug 31 2019

Examples

			b(1) = 2
b(2) = 5
b(3) = 0
b(4) = 7
b(5) = 18
b(3) < b(4) < b(5), so 4 is the first term of the sequence.
		

Crossrefs

Programs

  • Maple
    B := proc(n) option remember ; if n = 1 then 2; else if procname(n-1)-ithprime(n) < 0 then procname(n-1)+ithprime(n) ; else procname(n-1)-ithprime(n) ; fi; fi; end: A135025 := proc(n) option remember ; if n = 1 then 4; else for a from procname(n-1)+1 do if B(a-1) < B(a) and B(a) < B(a+1) then RETURN(a) ; fi; od: fi; end: for n from 1 do printf("%d,\n",A135025(n)) ; od: # R. J. Mathar, Feb 06 2009
  • Mathematica
    B[n_] := B[n] = If[n == 1, 2, If[B[n-1] - Prime[n] < 0, B[n-1] + Prime[n], B[n-1] - Prime[n]]];
    a[n_] := a[n] = If[n == 1, 4, For[k = a[n-1]+1, True, k++, If[B[k-1] < B[k] && B[k] < B[k+1], Return[k]]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 16}] (* Jean-François Alcover, Aug 16 2022, after R. J. Mathar *)

Extensions

New term added by Lior Deutsch (liorde(AT)gmail.com), Oct 17 2008
Definition corrected and entry revised by Robert Israel, Michel Marcus, and N. J. A. Sloane, Sep 29 2014
a(17)-a(28) from Giovanni Resta, Oct 02 2019

A324787 Index of n-th low point in A022837.

Original entry on oeis.org

2, 5, 12, 29, 78, 199, 508, 1355, 3592, 9589, 25752, 70579, 194228, 539961, 1507602, 4228745, 11913940, 33690443, 95581182, 272003821, 776082524, 2219823175, 6363074656
Offset: 0

Views

Author

N. J. A. Sloane, Sep 04 2019

Keywords

Comments

A "low point" in a sequence is a term which is less than the previous term (this condition is skipped for the initial term) and which is followed by two or more increases.

Crossrefs

If the basic sequence (A022837) began with 0 instead of 1 we would get A008348, A309226, A324782, A324783, A309225.

Programs

  • Maple
    Riecaman := proc(a,s,M)
    # Start with s, add or subtract a[n], get M terms. If a has w terms, can get M=w+1 terms.
    local b,M2,n,t;
    if whattype(a) <> list then ERROR("First argument should be a list"); fi;
    if a[1]=0 then ERROR("a[1] should not be zero"); fi;
    M2 := min(nops(a),M-1);
    b:=[s]; t:=s;
    for n from 1 to M2 do
       if a[n]>t then t:=t+a[n] else t:=t-a[n]; fi; b:=[op(b),t]; od:
    b; end;
    blocks := proc(a,S) local b,c,d,M,L,n;
    # Given a list a, whose leading term has index S, return [b,c,d], where b lists the indices of the low points in a, c lists the values of a at the low points, and d lists the length of runs between the low points.
    b:=[]; c:=[]; d:=[]; L:=1;
    # if a[1] a low point?
       n:=1;
       if( (a[n+1]>a[n]) and (a[n+2]>a[n+1]) ) then
       b:=[op(b),n+S-1]; c:=[op(c),a[n]]; d:=[op(d), n-L]; L:=n; fi;
    for n from 2 to nops(a)-2 do
    # if a[n] a low point?
       if( (a[n-1]>a[n]) and (a[n+1]>a[n]) and (a[n+2]>a[n+1]) ) then
       b:=[op(b),n+S-1]; c:=[op(c),a[n]]; d:=[op(d), n-L]; L:=n; fi; od;
    [b,c,d]; end;
    p0:=[seq(ithprime(n),n=1..100001)]:
    q1:=Riecaman(p0,1,100000):
    blocks(q1,0); # produces [the present sequence, A324788, A324789]
  • PARI
    See Links section.

Extensions

Modified definition to make offset 0. - N. J. A. Sloane, Oct 02 2019
a(12)-a(22) from Rémy Sigrist, Oct 18 2020

A324785 Values of A005132 at its low points.

Original entry on oeis.org

0, 2, 8, 14, 26, 64, 40, 4, 115, 266, 47, 229, 165, 92, 459, 404, 287, 139, 111, 844, 724, 516, 1639, 255, 181, 1424, 1099, 2974, 2930, 803, 644, 475, 380, 205, 150, 2694, 2428, 1942, 1314, 963, 5320, 637, 426, 371, 5094, 4852, 4422, 3700, 3138, 2534, 9953, 1821, 1592, 1363, 1188, 9680, 616
Offset: 1

Views

Author

N. J. A. Sloane, Sep 01 2019

Keywords

Crossrefs

A324786 First differences of A324784: distances in A005132 from one low point to the next.

Original entry on oeis.org

4, 12, 15, 33, 35, 12, 20, 39, 17, 35, 63, 52, 66, 47, 58, 166, 80, 16, 73, 140, 244, 75, 43, 64, 303, 262, 89, 24, 55, 194, 82, 74, 130, 30, 215, 216, 784, 268, 358, 103, 49, 146, 34, 199, 216, 656, 632, 544, 492, 109, 429, 114, 186, 210, 127, 169, 106, 64, 477, 564, 422, 354, 644, 440, 1162
Offset: 1

Views

Author

N. J. A. Sloane, Sep 01 2019

Keywords

Crossrefs

A324791 Value of A076042 at its n-th low point.

Original entry on oeis.org

0, 5, 7, 4, 19, 104, 74, 193, 515, 725, 241, 1948, 2948, 709, 8746, 16451, 48443, 47915, 61369, 41566, 136585, 710582, 476516, 1363747, 3165833, 5491067, 11906702, 15854273, 6895924, 38766838, 63676139, 3935833, 209116033, 219826349, 265573243, 263220940
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
    # Maple program from N. J. A. Sloane, Oct 03 2019; guessb = A325056, guessc = A324791 (this sequence).
    Digits := 64;
    f := proc(k,M) local j1, twoL, RL, kprime, Mprime;
    j1 := 3*k^2+7*k+17/4+2*M;
    if issqr(j1) then lprint("Beware, perfect square: k,M,j1 are ",k,M,j1); fi;
    twoL := -k-3/2+evalf(sqrt(j1)) ;
    RL := floor(twoL/2);
    Mprime := M+(k+1)^2 - (2*k*RL+3*RL+2*RL^2);
    kprime := 1+k+2*RL;
    [twol, RL, Mprime, kprime];
    end;
    guessb:=[0,5]; b:=5; guessc:=[0,5]; c:=5;
    for i from 1 to 100 do
    t1:=f(b,c);
    b:=t1[4]; c:=t1[3]; guessb:=[op(guessb),b]; guessc:=[op(guessc),c];
    od:
    guessb; guessc;
  • 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, b]]]; L (* Giovanni Resta, Oct 01 2019 *)
  • PARI
    \\ See Tomas Rokicki's PARI program in A076042.

Extensions

More terms from Giovanni Resta, Oct 01 2019

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
Showing 1-10 of 10 results.