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-10 of 17 results. Next

A014076 Odd nonprimes.

Original entry on oeis.org

1, 9, 15, 21, 25, 27, 33, 35, 39, 45, 49, 51, 55, 57, 63, 65, 69, 75, 77, 81, 85, 87, 91, 93, 95, 99, 105, 111, 115, 117, 119, 121, 123, 125, 129, 133, 135, 141, 143, 145, 147, 153, 155, 159, 161, 165, 169, 171, 175, 177, 183, 185, 187, 189, 195, 201, 203, 205, 207
Offset: 1

Views

Author

Keywords

Comments

Same as A071904 except for the initial term 1 (which is not composite).
Numbers n such that product of first n odd numbers divided by sum of the first n odd numbers is an integer : 1*3*5*...*(2*n - 1) / (1 + 3 + 5 + ... + (2*n - 1)) = c. - Ctibor O. Zizka, Jun 26 2010
Conjecture: There exist infinitely many pairs [a(n), a(n)+6] such that a(n)/3 and (a(n)+6)/3 are twin primes. - Eric Desbiaux, Sep 25 2014.
Odd numbers 2*n + 1 such that (2*n)!/(2*n + 1) is an integer. Odd terms of A056653. - Peter Bala, Jan 24 2017

Crossrefs

Cf. A002808, A005408; first differences: A067970, A196274; A047846.
Cf. A056653.

Programs

  • Haskell
    a014076 n = a014076_list !! (n-1)
    a014076_list = filter ((== 0) . a010051) a005408_list
    -- Reinhard Zumkeller, Sep 30 2011
    
  • Maple
    remove(isprime, [seq(i,i=1..1000,2)]); # Robert Israel, May 25 2016
    for n from 0 to 120 do
    if irem(factorial(2*n), 2*n+1) = 0 then print(2*n+1) end if;
    end do: # Peter Bala, Jan 24 2017
  • Mathematica
    Select[Range@210, !PrimeQ@ # && OddQ@ # &] (* Robert G. Wilson v, Sep 22 2008 *)
    Select[Range[1, 199, 2], PrimeOmega[#] != 1 &] (* Alonso del Arte, Nov 19 2012 *)
  • PARI
    is(n)=n%2 && !isprime(n) \\ Charles R Greathouse IV, Nov 24 2012
    
  • Python
    from sympy import primepi
    def A014076(n):
        if n == 1: return 1
        m, k = n-1, primepi(n) + n - 1 + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n - 1 + (k>>1)
        return m # Chai Wah Wu, Jul 31 2024

Formula

A000035(a(n))*(1 - A010051(a(n))) = 1. - Reinhard Zumkeller, Sep 30 2011
a(n) ~ 2n. - Charles R Greathouse IV, Jul 02 2013
(a(n+2)-1)/2 - pi(a(n+2)-1) = n. - Anthony Browne, May 25 2016. Proof from Robert Israel: This follows by induction on n. If f(n) = (a(n+2)-1)/2 - pi(a(n+2)-1), one can show f(n+1) - f(n) = 1 (there are three cases to consider, depending on primeness of a(n+2) + 2 and a(n+2) + 4).
Union of A091113 and A091236. - R. J. Mathar, Oct 02 2018

A016105 Blum integers: numbers of the form p * q where p and q are distinct primes congruent to 3 (mod 4).

Original entry on oeis.org

21, 33, 57, 69, 77, 93, 129, 133, 141, 161, 177, 201, 209, 213, 217, 237, 249, 253, 301, 309, 321, 329, 341, 381, 393, 413, 417, 437, 453, 469, 473, 489, 497, 501, 517, 537, 553, 573, 581, 589, 597, 633, 649, 669, 681, 713, 717, 721, 737, 749, 753, 781, 789
Offset: 1

Views

Author

Keywords

Comments

Subsequence of A084109. - Ralf Stephan and David W. Wilson, Apr 17 2005
Subsequence of A046388. - Altug Alkan, Dec 10 2015
Subsequence of A339817. No common terms with A339870. - Antti Karttunen, Dec 26 2020
Named after the Venezuelan-American computer scientist Manuel Blum (b. 1938). - Amiram Eldar, Jun 06 2021
First introduced by Blum, Blum, & Shub for the generation of pseudorandom numbers and later applied (by Manuel Blum and other authors) to zero-knowledge proofs. - Charles R Greathouse IV, Sep 26 2024

References

  • Lenore Blum, Manuel Blum, and Mike Shub. A simple unpredictable pseudorandom number generator, SIAM Journal on computing 15:2 (1986), pp. 364-383.

Crossrefs

Intersection of A005117 and A107978.
Also, subsequence of the following sequences: A046388, A084109, A091113, A167181, A339817.

Programs

  • Haskell
    import Data.Set (singleton, fromList, deleteFindMin, union)
    a016105 n = a016105_list !! (n-1)
    a016105_list = f [3,7] (drop 2 a002145_list) 21 (singleton 21) where
       f qs (p:p':ps) t s
         | m < t     = m : f qs (p:p':ps) t s'
         | otherwise = m : f (p:qs) (p':ps) t' (s' `union` (fromList pqs))
         where (m,s') = deleteFindMin s
               t' = head $ dropWhile (> 3*p') pqs
               pqs = map (p *) qs
    -- Reinhard Zumkeller, Sep 23 2011
    
  • Maple
    N:= 10000: # to get all terms <= N
    Primes:= select(isprime, [seq(i,i=3..N/3,4)]):
    S:=select(`<=`,{seq(seq(Primes[i]*Primes[j],i=1..j-1),j=2..nops(Primes))},N):
    sort(convert(S,list)); # Robert Israel, Dec 11 2015
  • Mathematica
    With[{upto = 820}, Select[Union[Times@@@Subsets[ Select[Prime[Range[ PrimePi[ NextPrime[upto/3]]]], Mod[#, 4] == 3 &], {2}]], # <= upto &]] (* Harvey P. Dale, Aug 19 2011 *)
    Select[4Range[5, 197] + 1, PrimeNu[#] == 2 && MoebiusMu[#] == 1 && Mod[FactorInteger[#][[1, 1]], 4] != 1 &] (* Alonso del Arte, Nov 18 2015 *)
  • PARI
    list(lim)=my(P=List(),v=List(),t,p); forprimestep(p=3,lim\3,4, listput(P,p)); for(i=2,#P, p=P[i]; for(j=1,i-1, t=p*P[j]; if(t>lim, break); listput(v,t))); Set(v) \\ Charles R Greathouse IV, Jul 01 2016, updated Sep 26 2024
    
  • PARI
    isA016105(n) = (2==omega(n)&&2==bigomega(n)&&1==(n%4)&&3==((factor(n)[1,1])%4)); \\ Antti Karttunen, Dec 26 2020
    
  • Perl
    use ntheory ":all"; forcomposites { say if ($ % 4) == 1 && is_square_free($) && scalar(factor($)) == 2 && !scalar(grep { ($ % 4) != 3 } factor($)); } 10000; # _Dana Jacobsen, Dec 10 2015
    
  • Python
    from sympy import factorint
    def ok(n):
        fn = factorint(n)
        return len(fn) == sum(fn.values()) == 2 and all(f%4 == 3 for f in fn)
    print([k for k in range(790) if ok(k)]) # Michael S. Branicky, Dec 20 2021

Formula

a(n) = A195758(n) * A195759(n). - Reinhard Zumkeller, Sep 23 2011
a(n) ~ 4n log n/log log n. - Charles R Greathouse IV, Sep 17 2022

Extensions

More terms from Erich Friedman

A091236 Nonprimes of form 4k+3.

Original entry on oeis.org

15, 27, 35, 39, 51, 55, 63, 75, 87, 91, 95, 99, 111, 115, 119, 123, 135, 143, 147, 155, 159, 171, 175, 183, 187, 195, 203, 207, 215, 219, 231, 235, 243, 247, 255, 259, 267, 275, 279, 287, 291, 295, 299, 303, 315, 319, 323, 327, 335, 339, 343, 351, 355, 363
Offset: 1

Views

Author

Labos Elemer, Feb 24 2004

Keywords

Comments

If we define f(n) to be the number of primes (counted with multiplicity) of the form 4k + 3 that divide n, then with this sequence f(a(n)) is always odd. For example, 95 is divisible by 17 and 99 is divisible by 3 (twice) and 11. - Alonso del Arte, Jan 13 2016
Complement of A002145 with respect to A004767. - Michel Marcus, Jan 17 2016
With the Jan 05 2004 Jovovic comment on A078703: The number of 1 and -1 (mod 4) divisors of a(n) are identical. Proof: each number 3 (mod 4) is trivially not a sum of two squares. The number of solutions of n as a sum of two squares is r_2(n) = 4*(d_1(n) - d_3(n)), where d_k(n) is the number of k (mod 4) divisors of n. See e.g., Grosswald, pp. 15-16 for the proof of Jacobi. - Wolfdieter Lang, Jul 29 2016

Examples

			27 = 4 * 6 + 3 = 3^3.
35 = 4 * 8 + 3 = 5 * 7.
a(8) = 75 with 2*A078703(19) = 6 divisors [1, 3, 5, 15, 25, 75], which are 1, -1, 1, -1, 1, -1 (mod 4). - _Wolfdieter Lang_, Jul 29 2016
		

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985.

Crossrefs

Programs

  • Maple
    A091236 := proc(n)
        option remember  ;
        local a;
        if n = 1 then
            15 ;
        else
            for a from procname(n-1)+1 do
                if not isprime(a) and modp(a,4) = 3 then
                    return a;
                end if;
            end do;
        end if;
    end proc:
    seq(A091236(n),n=1..20) ; # R. J. Mathar, Jul 20 2025
  • Mathematica
    Select[Range[1000], !PrimeQ[#] && IntegerQ[(# - 3)/4] &] (* Harvey P. Dale, Aug 16 2013 *)
    Select[4Range[100] - 1, Not[PrimeQ[#]] &] (* Alonso del Arte, Jan 13 2016 *)
  • PARI
    lista(nn) = for(n=1, nn, if(!isprime(k=4*n+3), print1(k, ", "))); \\ Altug Alkan, Jan 17 2016

A339817 Squarefree numbers k > 1 for which the 2-adic valuation of phi(k) does not exceed the 2-adic valuation of k-1.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 21, 23, 29, 31, 33, 37, 41, 43, 47, 53, 57, 59, 61, 65, 67, 69, 71, 73, 77, 79, 83, 89, 93, 97, 101, 103, 107, 109, 113, 127, 129, 131, 133, 137, 139, 141, 145, 149, 151, 157, 161, 163, 167, 173, 177, 179, 181, 191, 193, 197, 199, 201, 209, 211, 213, 217, 223, 227, 229, 233, 237, 239, 241
Offset: 1

Views

Author

Antti Karttunen, Dec 19 2020

Keywords

Comments

After 2, terms of A003961(A019565(A339816(i))) [or equally, of A019565(2*A339816(i))], for i = 1.., sorted into ascending order.
Natural numbers n that satisfy equation y * phi(n) = n - 1 (with y an integer) all occur in this sequence. Lehmer conjectured that there are no solutions such that n is composite (and thus y > 1).
From Antti Karttunen, Dec 22-26 2020: (Start)
Composite terms in this sequence are all of the form 4u+1 (A016813, A091113).
Generally, if any term k > 2 here has x prime divisors (which are all odd and distinct, i.e., A001221(k) = A001222(k) = x), then k is of the form 2^x * u + 1 (where u maybe even or odd), because each prime divisor of k contributes at least one instance of 2 in phi(k). Specifically, each prime factor of the form 4u+3 (A002145) contributes one instance of 2 (+1 to the 2-adic valuation), while primes of the form 4u+1 (A002144) contribute at least +2 to the 2-adic valuation. There must be an even number of 4u+3 primes, as otherwise the product would be of the form 4u+3. On the other hand, although all the terms of A016105 occur here, none of them occurs in A339870.
If the only terms this sequence shares with A339879 are the primes (A000040), then Lehmer's conjecture certainly holds. Similarly if the sequences A339818 and A339869 do not have any common terms.
(End)

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 250], SquareFreeQ[#] && IntegerExponent[EulerPhi[#], 2] <= IntegerExponent[# - 1, 2] &] (* Amiram Eldar, Feb 17 2021 *)
  • PARI
    isA339817(n) = ((n>1)&&issquarefree(n)&&(valuation(eulerphi(n),2)<=valuation(n-1,2)));

A091300 Nonprimes of the form 6k + 1.

Original entry on oeis.org

1, 25, 49, 55, 85, 91, 115, 121, 133, 145, 169, 175, 187, 205, 217, 235, 247, 253, 259, 265, 289, 295, 301, 319, 325, 343, 355, 361, 385, 391, 403, 415, 427, 445, 451, 469, 475, 481, 493, 505, 511, 517, 529, 535, 553, 559, 565, 583, 589, 595, 625, 637, 649
Offset: 1

Views

Author

Labos Elemer, Feb 24 2004

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section D1.

Crossrefs

Cf. A002476. Subsequence of A016921.

Programs

  • GAP
    Filtered(List([0..110],k->6*k+1),n->not IsPrime(n)); # Muniru A Asiru, Mar 12 2019
    
  • Maple
    for k from 0 to 100 do if(not isprime(6*k+1))then printf("%d, ",6*k+1); fi: od: # Nathaniel Johnston, May 18 2011
  • Mathematica
    Do[If[ !PrimeQ[n]&&Equal[Mod[n, 6], 1 ], Print[n]], {n, 1, 1000}]
    DeleteCases[6*Range[0,150]+1,?PrimeQ] (* _Harvey P. Dale, Jun 23 2014 *)
  • Sage
    [n for n in (1..650) if ((n-1)/6).is_integer() and not is_prime(n)] # Stefano Spezia, Oct 05 2024

A339870 Composite numbers k of the form 4u+1 for which the odd part of phi(k) divides k-1.

Original entry on oeis.org

85, 561, 1105, 1261, 1285, 2465, 4369, 6601, 8245, 8481, 9061, 9605, 10585, 16405, 16705, 17733, 18721, 19669, 21845, 23001, 28645, 30889, 38165, 42121, 43165, 46657, 54741, 56797, 57205, 62745, 65365, 74593, 78013, 83665, 88561, 91001, 106141, 117181, 124645, 126701, 134521, 136981, 141661, 162401, 171205, 176437
Offset: 1

Views

Author

Antti Karttunen, Dec 22 2020

Keywords

Comments

From Antti Karttunen, Dec 26 2020: (Start)
Equally, squarefree composite numbers k of the form 4u+1 for which A336466(k) divides k-1. This follows because on squarefree n, A336466(n) = A053575(n).
No common terms with A016105, because 4xy + 2(x+y) + 1 does not divide 4xy + 3(x+y) + 2 for any distinct x, y >= 0 (where 4x+3 and 4y+3 are the two prime factors of Blum integers).
This can also seen by another way: If this sequence contained any Blum integers, then, because A016105 is a subsequence of A339817, we would have found a composite number n satisfying Lehmer's totient problem y * phi(n) = n-1, for some integer y > 1. But Lehmer proved that such solutions should have at least 7 distinct prime factors, while Blum integers have only two.
Moreover, it seems that none of the terms of A167181 may occur here, and a few of A137409 (i.e., of A125667). See A339875 for those terms.
(End)

Examples

			85 = 4*21 + 1 = 5*17, thus phi(85) = 4*16 = 64, the odd part of which is A000265(64) = 1, which certainly divides 85-1, therefore 85 is included as a term.
561 = 4*140 + 1 = 3*11*17, thus phi(561) = 2*10*16 = 320, the odd part of which is A000265(320) = 5, which divides 560, therefore 561 is included.
		

Crossrefs

Subsequence of A005117.
Intersection of A091113 and A339880.
Cf. A339875 (a subsequence).
Cf. also comments in A339817.

Programs

  • Mathematica
    odd[n_] := n/2^IntegerExponent[n, 2]; Select[4*Range[45000] + 1, CompositeQ[#] && Divisible[# - 1, odd[EulerPhi[#]]] &] (* Amiram Eldar, Feb 17 2021 *)
  • PARI
    A000265(n) = (n>>valuation(n, 2));
    isA339870(n) = ((n>1)&&!isprime(n)&&(1==(n%4))&&!((n-1)%A000265(eulerphi(n))));

A093183 Number of consecutive runs of just 1 odd nonprime congruent to 1 mod 4 below 10^n.

Original entry on oeis.org

0, 3, 74, 1114, 13437, 151311, 1642197, 17405273, 181925434, 1883327626, 19364371468, 198115934511, 2019328584101
Offset: 1

Views

Author

Enoch Haga, Mar 30 2004

Keywords

Comments

Split the odd nonprime sequence A014076 into two subsequences A091113 and A091236 with nonprimes labeled 1 mod 4 or 3 mod 4. Add count of nonprimes to sequence if just 1 nonprime congruent to 1 mod 4 occurs before interruption of a nonprime congruent to 3 mod 4.
Otherwise said: count the nonprimes congruent to 1 mod 4 such that the next larger and next smaller odd nonprime is congruent to 3 mod 4. - M. F. Hasler, Sep 30 2018

Examples

			a(3) = 74 because 74 single nonprime runs occur below 10^3, each run interrupted by a nonprime congruent to 3 mod 4.
Below 10^2 = 100, there are only a(2) = 3 isolated odd nonprimes congruent to 1 mod 4: 33, 57 and 93. (Credits: _Peter Munn_, SeqFan list.) - _M. F. Hasler_, Sep 30 2018
		

Crossrefs

Programs

  • Maple
    A014076 := proc(n)
        option remember;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+2 by 2 do
                if not isprime(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    isA091113 := proc(n)
        option remember;
        if modp(n,4) = 1 and not isprime(n) then
            true;
        else
            false;
        end if;
    end proc:
    isA091236 := proc(n)
        option remember;
        if modp(n,4) = 3 and not isprime(n) then
            true;
        else
            false;
        end if;
    end proc:
    ct := 0 :
    n := 1 :
    for i from 2 do
        odnpr := A014076(i) ;
        prev := A014076(i-1) ;
        nxt := A014076(i+1) ;
        if isA091113(odnpr) and isA091236(prev) and isA091236(nxt) then
            ct := ct+1 ;
        end if;
        if odnpr< 10^n and nxt >= 10^n then
            print(n,ct) ;
            n := n+1 ;
        end if;
    end do: # R. J. Mathar, Oct 02 2018
  • Mathematica
    A091113 = Select[4 Range[0, 10^5] + 1, ! PrimeQ[#] &];
    A091236 = Select[4 Range[0, 10^5] + 3, ! PrimeQ[#] &];
    lst = {}; Do[If[Length[s = Select[A091113,Between[{A091236[[i]], A091236[[i + 1]]}]]] == 1, AppendTo[lst, s]], {i, Length[A091236] - 1}]; Table[Count[Flatten[lst], x_ /; x < 10^n], {n, 5}]  (* Robert Price, May 30 2019 *)

Extensions

a(9)-a(13) from Bert Dobbelaere, Dec 19 2018

A093184 Number of consecutive runs of just 1 odd nonprime congruent to 3 mod 4 below 10^n.

Original entry on oeis.org

0, 4, 76, 1120, 13428, 151342, 1642285, 17405478, 181923798, 1883330510, 19364376037, 198115964781, 2019328569227
Offset: 1

Views

Author

Enoch Haga, Mar 30 2004

Keywords

Examples

			a(3)=76 because 76 single nonprime runs occur below 10^3, each run interrupted by a nonprime congruent to 1 mod 4
		

Crossrefs

Programs

  • Mathematica
    A091113 = Select[4 Range[0, 10^4] + 1, ! PrimeQ[#] &];
    A091236 = Select[4 Range[0, 10^4] + 3, ! PrimeQ[#] &];
    lst = {}; Do[If[Length[s = Select[A091236, Between[{A091113[[i]], A091113[[i + 1]]}]]] == 1, AppendTo[lst, s]], {i, Length[A091113] - 1}]; Table[Count[Flatten[lst], x_ /; x < 10^n], {n, 4}]  (* Robert Price, May 30 2019 *)

Formula

Generate the odd nonprime sequence with nonprimes labeled 1 mod 4 or 3 mod 4. Add count of nonprimes to sequence if just 1 nonprime congruent to 3 mod 4 occurs before interruption of a nonprime congruent to 1 mod 4.

Extensions

a(9)-a(13) from Bert Dobbelaere, Dec 19 2018

A093188 Number of consecutive runs of 3 odd nonprimes congruent to 3 mod 4 below 10^n.

Original entry on oeis.org

0, 0, 5, 49, 356, 2678, 21085, 166814, 1345812, 11080939, 92699035, 786630700, 6757485506
Offset: 1

Views

Author

Enoch Haga, Mar 30 2004

Keywords

Examples

			a(3)=5 because 5 nonprime runs of 3 occur below 10^3, each run interrupted by a nonprime congruent to 1 mod 4.
		

Crossrefs

Programs

  • Mathematica
    A091113 = Select[4 Range[0, 10^4] + 1, ! PrimeQ[#] &];
    A091236 = Select[4 Range[0, 10^4] + 3, ! PrimeQ[#] &];
    lst = {}; Do[If[Length[s = Select[A091236, Between[{A091113[[i]], A091113[[i + 1]]}]]] == 3, AppendTo[lst, Last[s]]], {i, Length[A091113] - 1}]; Table[Count[lst, x_ /; x < 10^n], {n, 4}]  (* Robert Price, May 31 2019 *)

Formula

Generate the odd nonprime sequence with nonprimes labeled 1 mod 4 or 3 mod 4. Add count of nonprimes to sequence if 3 nonprimes congruent to 3 mod 4 occur before interruption of a nonprime congruent to 1 mod 4

Extensions

a(9)-a(13) from Bert Dobbelaere, Dec 19 2018

A291745 Nonprimes of the form 3*k + 1.

Original entry on oeis.org

1, 4, 10, 16, 22, 25, 28, 34, 40, 46, 49, 52, 55, 58, 64, 70, 76, 82, 85, 88, 91, 94, 100, 106, 112, 115, 118, 121, 124, 130, 133, 136, 142, 145, 148, 154, 160, 166, 169, 172, 175, 178, 184, 187, 190, 196, 202, 205, 208, 214, 217, 220, 226, 232, 235, 238, 244, 247
Offset: 1

Views

Author

Vincenzo Librandi, Aug 31 2017

Keywords

Comments

Subsequence of A018252. A091300 is a subsequence.
A multiplicative semigroup: if m and n are in the sequence, then so is m*n. - Antti Karttunen, Jul 02 2024

Crossrefs

Cf. A002476, A016777, A091113, A091300, A291746, A291747, A373977 (characteristic function).

Programs

  • Magma
    [n: n in [1..400 by 3] | not IsPrime(n)];
  • Mathematica
    DeleteCases[3 Range[0, 300] + 1, _?PrimeQ]
Showing 1-10 of 17 results. Next