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.

A195896 Numbers of the form 2*p-1 or 3*p-1 where p is 1 or a prime.

Original entry on oeis.org

1, 2, 3, 5, 8, 9, 13, 14, 20, 21, 25, 32, 33, 37, 38, 45, 50, 56, 57, 61, 68, 73, 81, 85, 86, 92, 93, 105, 110, 117, 121, 122, 128, 133, 140, 141, 145, 157, 158, 165, 176, 177, 182, 193, 200, 201, 205, 212, 213, 217, 218, 225, 236, 248, 253, 261, 266, 273, 277, 290, 297, 301, 302, 308
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 24 2011

Keywords

Examples

			a(1)=1 because p=1 and 2*1 - 1 = 1;
a(2)=2 because p=1 and 3*1 - 1 = 2;
a(3)=3 because p=2 and 2*2 - 1 = 3;
a(4)=5 because p=2 and 3*3 - 1 = 5 or p=3 and p=2 and 3*2 - 1 = 5;
a(5)=8 because p=3 and 3*3 - 1 = 8.
		

Crossrefs

Programs

  • Maple
    isA195896 := proc(n)
            for p in {(n+1)/2,(n+1)/3} do
            if type(p,'integer') then
                    if isprime(p) or p = 1 then
                            return true;
                    end if;
            end if;
            end do;
            false ;
    end proc:
    for n from 1 to 400 do
            if isA195896(n) then
                    printf("%d,",n) ;
            end if;
    end do: # R. J. Mathar, Oct 15 2011
  • Mathematica
    Union[Flatten[Join[{1,2},{2#-1,3#-1}&/@Prime[Range[50]]]]] (* Harvey P. Dale, Mar 27 2015 *)

Formula

Union of A076274 and A112773.