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

A330949 Odd nonprime numbers whose prime indices are not all prime numbers.

Original entry on oeis.org

21, 35, 39, 49, 57, 63, 65, 69, 77, 87, 91, 95, 105, 111, 115, 117, 119, 129, 133, 141, 143, 145, 147, 159, 161, 169, 171, 175, 183, 185, 189, 195, 203, 207, 209, 213, 215, 217, 219, 221, 231, 235, 237, 245, 247, 253, 259, 261, 265, 267, 273, 285, 287, 291
Offset: 1

Views

Author

Gus Wiseman, Jan 14 2020

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
Also MM-numbers of multiset partitions with at least two parts, not all of which are singletons (see example).

Examples

			The sequence of terms together with their prime indices of prime indices begins:
   21: {{1},{1,1}}
   35: {{2},{1,1}}
   39: {{1},{1,2}}
   49: {{1,1},{1,1}}
   57: {{1},{1,1,1}}
   63: {{1},{1},{1,1}}
   65: {{2},{1,2}}
   69: {{1},{2,2}}
   77: {{1,1},{3}}
   87: {{1},{1,3}}
   91: {{1,1},{1,2}}
   95: {{2},{1,1,1}}
  105: {{1},{2},{1,1}}
  111: {{1},{1,1,2}}
  115: {{2},{2,2}}
  117: {{1},{1},{1,2}}
  119: {{1,1},{4}}
  129: {{1},{1,4}}
  133: {{1,1},{1,1,1}}
  141: {{1},{2,3}}
		

Crossrefs

Complement of A106092 in A330945.
Including even numbers gives A330948.
Including primes gives A330946.
The number of prime prime indices is given by A257994.
The number of nonprime prime indices is given by A330944.
Primes of prime index are A006450.
Primes of nonprime index are A007821.
Products of primes of prime index are A076610.
Products of primes of nonprime index are A320628.
The set S of numbers whose prime indices do not all belong to S is A324694.

Programs

  • Mathematica
    Select[Range[1,100,2],!PrimeQ[#]&&!And@@PrimeQ/@PrimePi/@First/@If[#==1,{},FactorInteger[#]]&]

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).
Showing 1-2 of 2 results.