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.

Previous Showing 21-28 of 28 results.

A023588 a(n) = sum of exponents in prime-power factorization of 2*prime(n)-1.

Original entry on oeis.org

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

Views

Author

Keywords

Programs

Formula

a(n) = A001222(A076274(n)). - R. J. Mathar, Mar 10 2011

A166257 Odd numbers not of the form prime(k) + phi(prime(k)).

Original entry on oeis.org

1, 7, 11, 15, 17, 19, 23, 27, 29, 31, 35, 39, 41, 43, 47, 49, 51, 53, 55, 59, 63, 65, 67, 69, 71, 75, 77, 79, 83, 87, 89, 91, 95, 97, 99, 101, 103, 107, 109, 111, 113, 115, 119, 123, 125, 127, 129, 131, 135, 137, 139, 143, 147, 149, 151, 153, 155, 159, 161, 163, 167
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 10 2009

Keywords

Crossrefs

Programs

  • Maple
    L := 100; S := {}:
    for i from 2 to L do
      for j from 2 to L do
        if i*j <= L then S := `union`(S, {2*i*j-1}) end if;
      end do;
    end do:
    {1} union S; # Peter Bala, Jan 30 2025
  • Mathematica
    Module[{upto=200},Complement[Range[1,upto,2],Table[n+EulerPhi[n],{n,Prime[ Range[PrimePi[upto]]]}]]] (* Harvey P. Dale, Jun 21 2019 *)

Formula

{1} U {A005408 \ A076274 }. - R. J. Mathar, May 21 2010

Extensions

Entries checked by R. J. Mathar, May 21 2010.

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.

A253242 Least k>=0 such that n^(2^k)+1 is prime (for even n), or (n^(2^k)+1)/2 is prime (for odd n); -1 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, -1, 0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 2, 1, 0, 1, -1, 0, 1, 0
Offset: 2

Views

Author

Eric Chen, Apr 19 2015

Keywords

Comments

Least k such that the generalized Fermat number in base n (GFN(k,n)) is prime.
a(n) = -1 if n is in A070265 (perfect powers with an odd exponent).
a(n) is currently unknown for n = {31, 38, 50, 55, 62, 63, 67, 68, 77, 83, 86, 89, 91, 92, 97, 98, 99, 104, 107, 109, 122, 123, 127, 135, 137, ...}
Corresponding primes are {3, 2, 5, 3, 7, 1201, 0, 5, 11, 61, 13, 7, 197, 113, 17, 41761, 19, 181, 401, 11, 23, 139921, 577, 13, 677, 0, 29, 421, 31, ...}. (use 0 if a(n) = -1)
All 2 <= n <= 1500 and 0 <= k <= 14 are checked, the first occurrence of k (start with k = 0) in a(n) are {2, 11, 7, 43, 41, 75, 274, 234, 331, 1342, 824, ...}.

Examples

			a(7) = 2 since (7^(2^0)+1)/2 and (7^(2^1)+1)/2 are not primes, but (7^(2^2)+1)/2 = 1201 is prime.
a(14) = 1 since 14^(2^0)+1 is not prime, but 14^(2^1)+1 = 197 is prime.
		

Crossrefs

Programs

  • Mathematica
    Table[k=0; While[p=If[EvenQ[n], (2n)^(2^k)+1, ((2n)^(2^k)+1)/2]; k<12 && !PrimeQ[p], k=k+1]; If[k==12, -1, k], {n, 2, 1500}]
  • PARI
    f(n) = for(k=0, 11, if(ispseudoprime(n^(2^k)+1), return(k))); -1
    g(n) = for(k=0, 11, if(ispseudoprime((n^(2^k)+1)/2), return(k))); -1
    a(n) = if(n%2==0, f(n), g(n))
    
  • PARI
    f(n,k)=if(n%2, (n^(2^k)+1)/2, n^(2^k)+1)
    a(n)=if(ispower(-n), -1, my(k); while(!ispseudoprime(f(n,k)), k++); k) \\ Charles R Greathouse IV, Apr 20 2015

Formula

a(2n) = A228101(n) = log_2(A079706(n)).
a(A006093(n)) = 0, a(A076274(n)) = 0, a(A070265(n)) = -1.

A330508 Numbers k such that k + 6^t is semiprime for t = 0 to 9.

Original entry on oeis.org

61273, 109441, 160213, 274501, 275473, 311593, 360673, 394201, 477181, 486061, 514993, 522085, 617137, 620053, 715477, 725485, 803833, 812677, 847117, 1063585, 1146913, 1182577, 1215865, 1232917, 1409425, 1508113, 1587241, 1768993, 1863073, 1895413, 2085517, 2095177
Offset: 1

Views

Author

K. D. Bajpai, Dec 16 2019

Keywords

Comments

a(2620) = 530079693 is the first multiple of 3 in this sequence; there are no multiples of 2. - Charles R Greathouse IV, Dec 20 2019

Examples

			a(1) = 61273:
  61273 + 6^0  =    61274 =   2 *  30637;
  61273 + 6^1  =    61279 = 233 *    263;
  61273 + 6^2  =    61309 =  37 *   1657;
  61273 + 6^3  =    61489 =  17 *   3617;
  61273 + 6^4  =    62569 =  13 *   4813;
  61273 + 6^5  =    69049 =  29 *   2381;
  61273 + 6^6  =   107929 =  37 *   2917;
  61273 + 6^7  =   341209 =  11 *  31019;
  61273 + 6^8  =  1740889 = 197 *   8837;
  61273 + 6^9  = 10138969 =  89 * 113921;
all ten results are semiprime.
		

Crossrefs

Subsequence of A076274.

Programs

  • Magma
    f:=func; [k:k in [1..2100000]|forall{m:m in [0..9]|f(k+6^m)}]; // Marius A. Burtea, Dec 20 2019
    
  • Mathematica
    fX[n_] = PrimeOmega[n] == 2; Select[Range[2000000], AllTrue[# + 6^{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, fX] &]
  • PARI
    issemi(n)=bigomega(n)==2
    is(n)=for(t=0,9, if(!issemi(n+6^t), return(0))); 1 \\ Charles R Greathouse IV, Dec 20 2019

A369493 Table read by rows: row n is the unique primitive Pythagorean triple (a,b,c) such that (a-b+c)/2 = prime(n) and the short leg "a" is odd.

Original entry on oeis.org

3, 4, 5, 5, 12, 13, 9, 40, 41, 13, 84, 85, 21, 220, 221, 25, 312, 313, 33, 544, 545, 37, 684, 685, 45, 1012, 1013, 57, 1624, 1625, 61, 1860, 1861, 73, 2664, 2665, 81, 3280, 3281, 85, 3612, 3613, 93, 4324, 4325, 105, 5512, 5513, 117, 6844, 6845, 121, 7320, 7321, 133, 8844, 8845, 141, 9940, 9941
Offset: 1

Views

Author

Keywords

Comments

See Exercise 3.5. of the reference.

Examples

			Table begins:
  n=1:   3,   4,   5;
  n=2:   5,  12,  13;
  n=3:   9,  40,  41;
  n=4:  13,  84,  85;
  n=5:  21, 220, 221;
		

References

  • Miguel Ángel Pérez García-Ortega, José Manuel Sánchez Muñoz and José Miguel Blanco Casado, El Libro de las Ternas Pitagóricas, Preprint 2024.

Crossrefs

Cf. A000040, A076274 (short leg), A006093 (inradius).

Formula

Row n = (a, b, c) = (2*p - 1, 2*p^2 - 2*p, 2*p^2 - 2*p + 1), where p = prime(n) = A000040(n).

A178623 Triangle T(n,m) read by rows: T(n,0)= prime(n); T(n,m)=1 if m>=1.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 5, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 29
Offset: 0

Views

Author

Paul Curtz, May 31 2010

Keywords

Comments

The sequence reflects a conjecture on the denominator of inverse Bernoulli polynomials in A178340: if the row index is one less than one of the primes in A008578, the row of denominators starts with that prime and contains 1's in the remaining entries.
[Row sums in A178252 are A159069(n+1), unless there is a common factor in numerator and denominator. The row sum over columns with index of the same parity as the row index in the table of fractions of the [x^m] B^{-1}(n,x) in A178252 are: 1, 1, 1/3+1=4/3, 1+1=2, 1/5+2+1=16/5, 1+10/3+1=16/3, 1/7+3+5+1=64/7, 16, 256/9, 256/5, 1024/11, 512/3, 496/13, ... =A084623(n+1)/A000265(n+1).]

Examples

			1;
2,1;
3,1,1;
5,1,1,1,1;
7,1,1,1,1,1,1;
11,1,1,1,1,1,1,1,1,1,1;
13,1,1,1,1,1,1,1,1,1,1,1,1;
17,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
19,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
23,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
29,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
		

Crossrefs

Cf. A076274 (row sums).

Formula

T(n,0) = A008578(n+1). T(n,m) =1, 1<=m<=A008578(n+1)-1.

A211979 Numbers n formed by p 1's followed by p - 1 0's, where p is prime(n).

Original entry on oeis.org

110, 11100, 111110000, 1111111000000, 111111111110000000000, 1111111111111000000000000, 111111111111111110000000000000000, 1111111111111111111000000000000000000, 111111111111111111111110000000000000000000000
Offset: 1

Views

Author

Omar E. Pol, Dec 12 2012

Keywords

Examples

			For n = 3, the third prime is 5, so a(3) = 111110000 (five 1's followed by four 0's).
		

Crossrefs

Binary representation of A060286.
a(n) has A076274(n) digits.

Programs

  • Mathematica
    (* Technically this is in base 10 *) Table[10^(Prime[n] - 1)((10^Prime[n] - 1)/9), {n, 20}] (* Alonso del Arte, Dec 12 2012 *)
    FromDigits[Join[PadRight[{},#,1],PadRight[{},#-1,0]]]&/@ Prime[ Range[ 10]] (* Harvey P. Dale, Aug 30 2015 *)
Previous Showing 21-28 of 28 results.