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.

A062590 Variation on A029834: a discrete version of the Mangoldt function. If n is prime then floor(log(prime(n))) else 0.

Original entry on oeis.org

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

Views

Author

Jason Earls, Jul 03 2001

Keywords

Examples

			a(5) = 2 because the fifth prime is 11, the logarithm of which is 2.397895...
a(6) = 0 because 6 is not prime.
a(7) = 2 because the seventh prime is 17, the logarithm of which is 2.833213344...
		

Crossrefs

Cf. A029834.

Programs

  • Mathematica
    Table[Boole[PrimeQ[n]] Floor[Log[Prime[n]]], {n, 105}] (* Alonso del Arte, Sep 07 2013 *)
  • PARI
    v=[]; for(n=1,150,v=concat(v, if(isprime(n),floor(log(prime(n))),))); v

Formula

a(n) = delta(tau(n), 2) * floor(log(prime(n))) = A010051(n) * A029835(n), where delta is the Kronecker delta function and tau is the number of divisors function. - Alonso del Arte, Sep 11 2013

A063529 a(n) = M(2^n-1), where M() is A029834, a discrete version of the Mangoldt function: if n is prime then floor(log(n)) else 0 and 2^n-1 is A000225.

Original entry on oeis.org

0, 1, 1, 0, 3, 0, 4, 0, 0, 0, 0, 0, 9, 0, 0, 0, 11, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Jason Earls, Aug 01 2001

Keywords

Crossrefs

Programs

  • PARI
    j=[]; for(n=1,150,j=concat(j, if(isprime(2^n-1),floor(log(2^n-1)),))); j

A029833 A discrete version of the Mangoldt function: if n is prime then round(log(n)) else 0.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The real Mangoldt function Lambda(n) is equal to log(n) if n is prime else 0.

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 32.
  • P. Ribenboim, Algebraic Numbers, p. 44.

Crossrefs

Programs

Extensions

More terms from Antti Karttunen, Feb 06 2019

A029832 A discrete version of the Mangoldt function: if n is prime then ceiling(log(n)) else 0.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The real Mangoldt function Lambda(n) is equal to log(n) if n is prime else 0.

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 32.
  • P. Ribenboim, Algebraic Numbers, p. 44.

Crossrefs

Programs

Extensions

More terms from Antti Karttunen, Feb 06 2019

A323161 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n<=3) = -n, f(n) = 0 if n-1 is an odd prime, and f(n) = floor((n-1)/2) for all other numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 4, 6, 4, 7, 7, 8, 4, 9, 4, 10, 10, 11, 4, 12, 4, 13, 13, 14, 4, 15, 15, 16, 16, 17, 4, 18, 4, 19, 19, 20, 20, 21, 4, 22, 22, 23, 4, 24, 4, 25, 25, 26, 4, 27, 27, 28, 28, 29, 4, 30, 30, 31, 31, 32, 4, 33, 4, 34, 34, 35, 35, 36, 4, 37, 37, 38, 4, 39, 4, 40, 40, 41, 41, 42, 4, 43, 43, 44, 4, 45, 45, 46, 46, 47, 4, 48, 48, 49, 49, 50, 50, 51, 4, 52, 52, 53, 4, 54, 4
Offset: 1

Views

Author

Antti Karttunen, Jan 06 2019

Keywords

Comments

For all i, j: A322809(i) = A322809(j) <=> a(i+1) = a(j+1).
For all i, j: a(i) = a(j) => b(i) = b(j), where b can be, but is not limited to, any of the following sequences: A029834, A049084, A062590, A063377, A064891, A078442 (A049076), A175663, A175682, A269668, A292936, A323162, many of which are related to counting primes in certain kinds of chains or iterations.
Why does this work? Consider the function f given in the definition: based on its properties, we can deduce from the value of f(n) the following information about n:
(A) If f(n) = -2, then n is 2, the only even prime,
(B) If f(n) = -3, then n is 3, the first odd prime,
(C) If f(n) is zero, then n is an even composite preceded by a prime, but we don't know which even composite exactly,
(D) If f(n) > 0 and f(1+2*f(n)) = f(2+2*f(n)), then n is either (D1) an odd composite number, or (D2) an even composite number preceded by an odd composite number, and the said composite number in both cases is 1 + 2*f(n),
(E) If f(n) > 0 and f(1+2*f(n)) <> f(2+2*f(n)), then n is an odd prime > 3, specifically, 1 + 2*f(n).
As this sequence is a restricted growth sequence transform of the said function f, we have a(i) = a(j) <=> f(i) = f(j) for all i, j, thus, even without knowing the value of n, but just a(n), we can find the value of f(n) by searching for the minimal k such that a(k) = a(n), then compute f(k) with that k. Furthermore, any function g defined as g(n) = h(f(n)) [where h is any function], clearly satisfies
a(i) = a(j) => g(i) = g(j), for all i, j. [*]
For instances of such functions g, we can consider many sequences like those sequences b(n) listed above, that have g(n) = 0 for all composite numbers, and g(p) > 0 for all primes p. This is usually the pattern, but there are exceptions, like A323162, which is the characteristic function of A005381, composites n such that n-1 is also composite. These are precisely the numbers that occur twice in this sequence, while all other numbers (including primes), occur just once, that is, reside in their own singular equivalence classes. Thus, it is not guaranteed that all sequences g matching to this sequence (i.e. those satisfying the implication *), even if not false positives in strict sense, would necessarily have some consistent relation to primes, instead, they might contain any random values at the positions given by A093515. However, in the current OEIS, such sequences are exceedingly rare.

Crossrefs

Cf. A005381 (numbers that occur twice in this sequence), A093515 (numbers > 1 that occur just once).
Cf. A010051, A029834, A049076, A049084, A062590, A063377, A064891, A078442, A175663, A175682, A269668, A292936, A323162 (some of the matched sequences).

Programs

  • PARI
    up_to = 10000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A323161aux(n) = if(n<=3,-n,if(isprime(n-1),0,((n-1)>>1))); \\ This implements the function f of the definition.
    v323161 = rgs_transform(vector(up_to,n,A323161aux(n)));
    A323161(n) = v323161[n];

Formula

a(1) = 1; for n > 1, a(n) = 1 + A322809(n-1).
Showing 1-5 of 5 results.