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.

A278997 Numbers of the form (3h+2)*3^(2k)-1 or (3h+1)*3^(2k+1)-1 for h,k in N.

Original entry on oeis.org

1, 2, 4, 7, 10, 11, 13, 16, 17, 19, 20, 22, 25, 26, 28, 29, 31, 34, 37, 38, 40, 43, 44, 46, 47, 49, 52, 55, 56, 58, 61, 64, 65, 67, 70, 71, 73, 74, 76, 79, 82, 83, 85, 88, 91, 92, 94, 97, 98, 100, 101, 103, 106, 107, 109, 110, 112, 115, 118, 119, 121, 124, 125, 127, 128, 130
Offset: 1

Views

Author

N. J. A. Sloane, Dec 07 2016

Keywords

Comments

n is in the sequence if and only if either n == 1, 2, 4, or 7 (mod 9) or n == 8 (mod 9) and (n-8)/9 is in the sequence. - Robert Israel, Dec 18 2016

Crossrefs

Complement of A278996.
Positions of 1's in A156595.

Programs

  • Maple
    filter:= proc(n) local m;
      m:= padic:-ordp(n+1,3);
      (n+1)/3^m mod 3 = 2 - (m mod 2)
    end proc:
    select(filter, [$0..100]); # Robert Israel, Dec 18 2016
  • Mathematica
    isok[n_]:=Module[{ord=IntegerExponent[n+1,3]},Mod[(n+1)/3^ord,3]!=Mod[ord,2]+1];Select[Range[0,100],isok](* Ray Chandler, Dec 17 2016 *)

Extensions

More terms from Ray Chandler, Dec 17 2016