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: Roderick MacPhee

Roderick MacPhee's wiki page.

Roderick MacPhee has authored 2 sequences.

A289206 Greedy strictly increasing sequence starting at a(1)=1 avoiding both arithmetic and geometric progressions of length 3.

Original entry on oeis.org

1, 2, 5, 6, 12, 13, 15, 16, 32, 33, 35, 39, 40, 42, 56, 81, 84, 85, 88, 90, 93, 94, 108, 109, 113, 115, 116, 159, 189, 207, 208, 222, 223, 232, 235, 240, 243, 244, 249, 250, 252, 259, 267, 271, 289, 304, 314, 318, 325, 340, 342, 397, 504, 508, 511, 531, 549
Offset: 1

Author

Roderick MacPhee, Jun 28 2017

Keywords

Comments

By avoiding arithmetic progressions, at most 2/3 of the numbers up to a(n) are in the sequence. The sequence doesn't contain 3 consecutive powers in arithmetic progression for any base c.
Where a(n)+1 = a(n+1): 1, 3, 5, 7, 9, 12, 17, 21, 23, 26, 30, 32, 37, 39, etc. - Robert G. Wilson v, Jul 02 2017

Examples

			5 is in the sequence because 1,2,5 is neither an arithmetic progression nor a geometric progression.
		

Crossrefs

Programs

  • PARI
    {my(a=[1,2]);
    for(x=3,100,
    if(#select(r->#select(q->q==2*r,b)==0,b=vecsort(apply(r->x-r,a)))==#a && #select(r->#select(q->q==r^2,b)==0,b=vecsort(apply(r->x/r,a)))==#a,a=concat(a,x)));a
    }
    
  • PARI
    first(n)=my(v=vector(n)); v[1]=1; for(k=2,n, my(avoid=List(),t,last=v[k-1]); for(i=2,k-1, for(j=1,i-1, t=2*v[i]-v[j]; if(t>last, listput(avoid, t)); if(denominator(t=v[i]^2/v[j])==1 && t>last, listput(avoid,t)))); avoid=Set(avoid); for(i=v[k-1]+1,v[k-1]+#avoid+1, if(!setsearch(avoid,i), v[k]=i; break))); v \\ Charles R Greathouse IV, Jun 29 2017

Formula

a(n) >= 3n/2 for n > 2.

Extensions

More terms from Alois P. Heinz, Jun 28 2017

A173912 Numbers x that when put through Lucas-Lehmer tests give a residue that has a digital root of 0 or 9.

Original entry on oeis.org

3, 5, 7, 13, 17, 19, 23, 31, 33, 51, 61, 71, 89, 101, 107, 127, 139, 191, 271, 273, 305, 331, 347, 351, 367, 397, 405, 407, 427, 435, 457, 467, 489, 521, 525, 539, 543, 549, 559, 565, 577, 583, 589, 597, 601, 607, 611, 613, 617, 619, 641, 643, 661, 693, 717, 729, 787, 793, 809, 817, 819, 837, 871, 879, 891, 899, 983, 987, 991
Offset: 1

Author

Roderick MacPhee, Nov 26 2010

Keywords

Comments

The PARI code uses a function that assumes 0 has a digital root of 9.
Note: since I allowed 0 to count as having digital root 9, all Mersenne prime exponents > 2 will be a subsequence of this sequence.

Programs

  • Mathematica
    lucaslehmer2Q[p_] := Module[{s = 4, x}, For[x = 1, x <= p-2, x++, s = Mod[s^2 - 2, 2^p - 1]; If[x == p-2 && sumdigits1[s] == 9, Return[True]]]; False];
    sumdigits1[n_] := If[Mod[n, 9] != 0, Mod[n, 9], 9];
    Select[Range[1000], lucaslehmer2Q] (* Jean-François Alcover, Sep 28 2020, after PARI *)
  • PARI
    lucaslehmer2(p) = s=4; for(x=1, p-2, s=(s^2-2)%(2^p-1)); if(x=p-2 && sumdigits1(s)==9, print1(p", "))
    sumdigits1(n)=if(n%9!=0,n%9,9)
    for(x=1,1000,lucaslehmer2(x))