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

A282783 Number of terms in A282430 less than or equal to 10^n.

Original entry on oeis.org

0, 1, 1, 6, 77, 1069, 13041, 153389, 1691609, 18175623, 192338138
Offset: 0

Views

Author

Arkadiusz Wesolowski, Feb 21 2017

Keywords

Comments

An approximate value of a(n) is given by C*10^n*(exp(-2) - 1/log(10^n)), where C = 0.209.

Crossrefs

Cf. A282430.

Programs

  • PARI
    a(n)={t=0; forstep(m=2, 10^n, 2, if(!(m%3)==0, x=0; until(p<2||isprime(p), p=m-3^x; x++); if(p<2, t++))); return(t)};

A058517 Positive even numbers not of the form prime + 3^x.

Original entry on oeis.org

2, 36, 66, 78, 96, 120, 126, 144, 156, 162, 186, 204, 210, 216, 222, 276, 288, 300, 306, 324, 328, 330, 336, 342, 366, 372, 378, 396, 408, 414, 426, 438, 456, 474, 486, 498, 516, 528, 534, 540, 546, 552, 562, 576, 582, 606, 612, 624, 630, 636, 666, 672, 690
Offset: 1

Views

Author

Robert G. Wilson v, Dec 21 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ i = 0; l = Ceiling[ N[ Log[ 3, n ] ] ]; While[ ! PrimeQ[ n - 3^i ] && i < l, i++ ]; If[ i == l, Print[ n ] ], {n, 2, 1000, 2} ]
  • PARI
    isok(n) = {if (n % 2, 0, lim = log(n)/log(3); for (k=0, lim, if (isprime(n - 3^k), return (0)););1;);} \\ Michel Marcus, Feb 25 2017

A282432 Number of primes of the form n - 3^k.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 0, 2, 0, 1, 1, 2, 0, 3, 0, 2, 0, 1, 0, 3, 0, 2, 0, 1, 0, 2, 0, 1, 1, 2, 0, 4, 0, 2, 0, 0, 0, 3, 0, 3, 0, 1, 0, 3, 0, 3, 0, 1, 0, 3, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 3, 0, 2, 0, 0, 0, 3, 0, 3, 0, 1, 0, 3, 0, 2, 0, 0, 0, 3, 0, 2, 1, 2, 0, 3, 0, 3, 0, 1, 0, 3, 0, 2, 0, 0, 0, 4, 0, 3, 0, 1, 0, 3, 0
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 15 2017

Keywords

Examples

			a(14) = 3; 14 - 3^0 = 13, 14 - 3 = 11, 14 - 3^2 = 5, three primes.
		

Crossrefs

Programs

  • Magma
    lst:=[]; for n in [1..105] do c:=0; e:=Floor(Log(3, n)); k:=0; while k le e do p:=n-3^k; if IsPrime(p) then c+:=1; end if; k+:=1; end while; Append(~lst, c); end for; lst;
    
  • Maple
    A282432 := proc(n)
        a := 0 ;
        for k from 0 do
            if n-3^k < 2 then
                return a ;
            elif isprime(n-3^k) then
                a := a+1 ;
            end if;
        end do:
    end proc:
    seq(A282432(n),n=1..80) ; # R. J. Mathar, Mar 07 2022
  • PARI
    ispp3(n) = (n==1) || (n==3) || (ispower(n,,&p) && (p==3));
    a(n) = {my(nb = 0); forprime(p=2, n, nb += ispp3(n-p);); nb;} \\ Michel Marcus, Feb 18 2017

Formula

a(A282430(n)) = 0.
G.f.: ( Sum_{i>=0} x^(3^i) ) * ( Sum_{j>=1} x^prime(j) ). - Ilya Gutkovskiy, Feb 10 2022

A283622 a(n) = smallest k > n + 1 not of the form p + n^x with p prime, where gcd(k, n) = 1 and gcd(k-1, n-1) = 1.

Original entry on oeis.org

127, 328, 149, 26, 127, 254, 17, 34, 59, 50, 37, 134, 23, 136, 65, 26, 43, 96, 29, 142, 47, 50, 49, 116, 35, 52, 53, 56, 79, 122, 41, 58, 59, 92, 157, 86, 47, 64, 89, 50, 67, 186, 53, 94, 95, 56, 73, 134, 59, 100, 77, 78, 79, 146, 65, 82, 83, 86, 109, 204, 71
Offset: 2

Views

Author

Arkadiusz Wesolowski, Mar 12 2017

Keywords

Crossrefs

Programs

  • Magma
    lst:=[]; for n in [2..62] do k:=n+2; t:=0; while t eq 0 do if GCD(k, n) eq 1 and GCD(k-1, n-1) eq 1 then x:=-1; repeat x+:=1; p:=k-n^x; until p lt 2 or IsPrime(p); if p lt 2 then Append(~lst, k); t:=1; end if; end if; k+:=1; end while; end for; lst;

A282191 Odd numbers divisible by 3 which are neither of the form p + 3^m + 1 nor of the form p + 3^m - 1 with p prime.

Original entry on oeis.org

5973, 22605, 28251, 42663, 47697, 50481, 50643, 52353, 58527, 63897, 71757, 76197, 86049, 92289, 92523, 93675, 94635, 96891, 104457, 105087, 105723, 112875, 117873, 118731, 121827, 122883, 129417, 131289, 137295, 138777, 141195, 141825, 142857, 143433
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 15 2017

Keywords

Comments

Numbers whose distance to both nearest neighbor numbers in A282430 is 1.

Crossrefs

Cf. A282430.

Programs

  • Magma
    lst:=[]; for n in [3..143433 by 6] do c:=0; e:=Floor(Log(3, n)); m:=0; while m le e do a:=n-3^m; if IsPrime(a+1) or IsPrime(a-1) then break; end if; c+:=1; m+:=1; end while; if c eq e+1 then Append(~lst, n); end if; end for; lst;
Showing 1-5 of 5 results.