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 71-80 of 80 results.

A370482 Characteristic function of primes plus characteristic function of even numbers.

Original entry on oeis.org

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

Views

Author

Jens Ahlström, Mar 31 2024

Keywords

Comments

There is only one 2 in the sequence, so if the value 2 is blanked out, a riddle is created that demands some out-of-the-box thinking.

Examples

			1 is neither prime nor even so a(1) = 0 + 0 = 0.
2 is both a prime and even so a(2) = 1 + 1 = 2.
3 is a prime but odd so a(3) = 1 + 0 = 1.
4 is not a prime but even so a(4) = 0 + 1 = 1.
		

Crossrefs

If a(2) were 1 instead of 2, then this would the characteristic function of {0} U A106092, whose complement A014076 gives the positions of 0's. - Antti Karttunen, Jan 17 2025

Programs

  • Mathematica
    a[n_] := Boole[PrimeQ[n]] + Boole[EvenQ[n]]; Array[a, 100, 0] (* Amiram Eldar, Mar 31 2024 *)
  • PARI
    A370482(n) = (!(n%2) + isprime(n)); \\ Antti Karttunen, Jan 17 2025
  • Python
    from sympy import isprime
    def A370482(n): return isprime(n)+(n&1^1) # Chai Wah Wu, Apr 25 2024
    

Formula

a(n) = A010051(n) + A059841(n).

A046446 Nonprimes whose prime factors contain only odd digits.

Original entry on oeis.org

1, 9, 15, 21, 25, 27, 33, 35, 39, 45, 49, 51, 55, 57, 63, 65, 75, 77, 81, 85, 91, 93, 95, 99, 105, 111, 117, 119, 121, 125, 133, 135, 143, 147, 153, 155, 159, 165, 169, 171, 175, 177, 185, 187, 189, 195, 209, 213, 217, 219, 221, 225, 231, 237, 243, 245, 247, 255
Offset: 1

Views

Author

Patrick De Geest, Jul 15 1998

Keywords

Examples

			247 = 13 * 19; 1, 3 and 9 are odd digits.
		

Crossrefs

Subsequence of A014076.

Programs

  • Maple
    isA046446 := proc(n)
        if not isprime(n) then
            fset := numtheory[factorset](n) ;
            for f in fset do
                convert(convert(f,base,10),set) ;
                if % intersect {0,2,4,6,8} <> {} then
                    return false;
                end if;
            end do:
            true ;
        else
            false;
        end if;
    end proc:
    for n from 1 to 260 do
        if isA046446(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Oct 02 2018
  • Mathematica
    Select[Range[255], ! PrimeQ[#] && And @@ OddQ[Union[Flatten[IntegerDigits[First /@ FactorInteger[#]]]]] &] (* Jayanta Basu, Jun 24 2013 *)

Extensions

Definition clarified by Harvey P. Dale, Jul 07 2018

A155474 Odd nonprimes n with distinct smallest digits of n and n-th prime.

Original entry on oeis.org

1, 9, 15, 21, 25, 27, 33, 35, 39, 45, 49, 51, 55, 57, 63, 65, 69, 75, 77, 85, 87, 91, 93, 95, 99, 105, 111, 117, 119, 123, 129, 143, 145, 147, 153, 155, 159, 161, 165, 169, 171, 175, 177, 183, 185, 201, 203, 205, 207, 209, 213, 225, 235, 237, 243, 245, 247, 249, 253
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 23 2009

Keywords

Examples

			If n=1=odd nonprime and 2=prime(1), then 1<2 and 1=a(1). If n=9=odd nonprime and 23=prime(9), then 9>2 and 9=a(2). If n=15=odd nonprime and 47=prime(15), then 1<4 and 15=a(3), etc.
		

Crossrefs

Extensions

Corrected (89 removed) by R. J. Mathar, May 10 2010

A156333 Odd nonprimes q=A141468(j) such that largest digit(j)+largest digit(q) is a prime.

Original entry on oeis.org

1, 39, 57, 91, 115, 121, 133, 143, 145, 147, 153, 155, 161, 175, 189, 203, 205, 207, 225, 231, 235, 243, 253, 255, 261, 273, 279, 285, 295, 299, 301, 303, 323, 325, 327, 341, 343, 345, 351, 355, 377, 385, 387, 411, 415, 427, 429, 441, 445, 447, 451, 465, 481, 483
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 08 2009

Keywords

Comments

Subsequence of A014076 - R. J. Mathar, Feb 10 2009

Crossrefs

Extensions

Rephrased definition. Inserted 207. - R. J. Mathar, Feb 10 2009

A162832 The odd nonprimes in A162939.

Original entry on oeis.org

1, 35, 65, 119, 125, 155, 161, 209, 245, 287, 299, 335, 341, 377, 395, 407, 425, 497, 539, 551, 575, 629, 665, 695, 731, 737, 749, 755, 785, 845, 899, 965, 989, 1025, 1037, 1079, 1115, 1127, 1235, 1241, 1295, 1325, 1331, 1379, 1421, 1457, 1475, 1529, 1547, 1577
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 14 2009

Keywords

Comments

Intersection of A014076 and A162939.

Crossrefs

Extensions

Definition simplified, 507 removed, extended by R. J. Mathar, Aug 12 2009

A162887 Odd nonprimes in an alternating 1-based sum up to some odd nonprime.

Original entry on oeis.org

15, 33, 39, 51, 69, 75, 87, 105, 117, 123, 129, 141, 159, 177, 183, 189, 195, 201, 213, 219, 231, 243, 249, 255, 267, 279, 285, 303, 309, 315, 321, 327, 333, 339, 357, 369, 375, 381, 393, 399, 411, 429, 435, 447, 453, 459, 465, 483, 489, 495, 501, 513, 519
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 16 2009

Keywords

Comments

Define the alternating sum S(u) = sum_{k=0..u} (1-(-1)^k*k) = A064455(u+1) as in A162886.
Evaluate the sum with upper limits u= 1,9, 15, 21... from A014076, and add S(u) to this sequence here whenever it is itself a member of A014076.

Examples

			The sequence S(u) = 3, 15, 24, 33, 39, 42, 51, 54, 60, 69, ... is generated by u = 1, 9, 15, 21, ...
The first S-term, 3, is prime, and therefore not added to the sequence. The second S-term, 15, is an odd nonprime and added to the sequence. The third, 24, is even and not added to the sequence.
		

Crossrefs

Cf. A014076.

Extensions

3 removed by R. J. Mathar, Aug 27 2009

A326586 Odd numbers which do not satisfy Korselt's criterion, complement of A324050.

Original entry on oeis.org

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
Offset: 1

Views

Author

Peter Luschny, Jul 21 2019

Keywords

Comments

The first number k > 1 not in this sequence but in A014076 is 561, because for every p in {3, 11, 17}, which are the prime divisors of 561, p - 1 divides 560.

Crossrefs

Programs

  • Mathematica
    Select[Range[3, 205, 2], CompositeQ[#] && Mod[#, CarmichaelLambda[#]] != 1&] (* Jean-François Alcover, Oct 16 2019 *)

Formula

isA326586(n) = true if n != 1 and not isEven(n) and not isPrime(n) and not isCarmichael(n).

A335419 Integers m such that every group of order m is not simple.

Original entry on oeis.org

1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 21, 20, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94
Offset: 1

Views

Author

Bernard Schott, Jul 09 2020

Keywords

Comments

Officially, the group of order 1 is not considered to be simple; "a group <> 1 is simple if it has no normal subgroups other than G and 1" (See reference for Joseph J. Rotman's definition).
There is no prime term because there exists only one group of order p and this cyclic group Z/pZ is simple.
As a consequence of Feit-Thompson theorem, all odd composites are terms of this sequence.
The first composite even number that is not present in the data is 60 that is the order of simple alternating group Alt(5), the second one that is missing is 168 corresponding to simple Lie group PSL(3,2) [A031963].

Examples

			There exist 5 (nonisomorphic) groups of order 8: Z/8Z, Z/2Z × Z/4Z, (Z/2Z)^3, D_4 and H_8; none of these 5 groups is simple, so 8 is a term.
There exist 13 (nonisomorphic) groups of order 60 (see A000001), 12 are not simple but the alternating group Alt(5) is simple, hence 60 is not a term.
		

References

  • Pascal Ortiz, Exercices d'Algèbre, Collection CAPES / Agrégation, Ellipses, Exercice 1.44 p.96.
  • Joseph J. Rotman, The Theory of Groups: An Introduction, 4th ed., Springer-Verlag, New-York, 1995. Page 39, Definition.

Crossrefs

Complement of A005180 (except for 1).
Subsequence: A014076 (odd nonprimes).
Cf. A000001, A031963, A051532 (similar for Abelian), A056867 (similar for nilpotent).

A348852 Numbers k such that the number of odd nonprimes <= k is equal to the number of primes <= k.

Original entry on oeis.org

2, 93, 94, 97, 98, 101, 102, 105, 106, 117, 118
Offset: 1

Views

Author

Giorgos Kalogeropoulos, Nov 01 2021

Keywords

Comments

This sequence is finite. For k > 118, there are always more odd nonprimes than primes <= k.
Numbers k such that A000720(k) = A033271(k). - Michel Marcus, Nov 06 2021

Examples

			a(4) = 97 is a term because there are 25 odd nonprimes <= 97 and 25 primes <= 97.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@1000,(k=#;Length@Select[Range@k,OddQ@#&&!PrimeQ@#&]==PrimePi@k)&]
  • PARI
    isok(k) = primepi(k) == #select(x->(!isprime(x) && (x%2)), [1..k]); \\ Michel Marcus, Nov 06 2021

A386963 Gaps between positions of odd terms in A065090.

Original entry on oeis.org

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

Views

Author

Aied Sulaiman, Aug 11 2025

Keywords

Comments

For n >= 2 we have a(n) in {2,3,4}:
a(n) = 2 if no prime lies between the two successive odd terms,
a(n) = 3 if a single prime lies between them,
a(n) = 4 if two primes lie between them.
The initial 5 comes from 3, 5, 7 between 1 and 9.
Conjecture: a(n) tends to 2 in frequency (i.e., {n : a(n) = 2} has natural density 1).
Conjecture is true because the primes have natural density 0. - Robert Israel, Aug 29 2025

Examples

			A065090: 1, 2, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, ...
Odd terms occur at positions: 1, 6, 10, 14, 17, 19, 23, 25, ...
Hence a(n): 5, 4, 4, 3, 2, 4, 2, ...
		

Crossrefs

Programs

  • Mathematica
    a065090=Select[Range[335],#==2||!PrimeQ[#]&];l=Length[a065090];p={};Do[If[OddQ[a065090[[i]] ],AppendTo[p,i]],{i,l}];Differences[p] (* James C. McMahon, Aug 29 2025 *)
  • PARI
    lista(nn) = my(vio = select(x->(x % 2), select(m->(!isprime(m) || m==2), [1..nn]), 1)); vector(#vio-1, k, vio[k+1] - vio[k]); \\ Michel Marcus, Aug 16 2025
  • Python
    from sympy import isprime
    def gaps_generator():
        pos = 0
        last = None
        k = 1
        while True:
            if not (k % 2 == 1 and isprime(k)):  # in A065090
                pos += 1
                if k % 2 == 1:  # odd term (A014076)
                    if last is None:
                        last = pos
                    else:
                        yield pos - last
                        last = pos
            k += 1
    def a(n: int) -> int:
        g = gaps_generator()
        for _ in range(n - 1):
            next(g)
        return next(g)
    
Previous Showing 71-80 of 80 results.