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 11-20 of 23 results. Next

A087560 Smallest m > n such that gcd(m, n^2) = n.

Original entry on oeis.org

2, 6, 6, 12, 10, 30, 14, 24, 18, 30, 22, 60, 26, 42, 30, 48, 34, 90, 38, 60, 42, 66, 46, 120, 50, 78, 54, 84, 58, 210, 62, 96, 66, 102, 70, 180, 74, 114, 78, 120, 82, 210, 86, 132, 90, 138, 94, 240, 98, 150, 102, 156, 106, 270, 110, 168, 114, 174, 118, 420, 122
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 24 2003

Keywords

Comments

Equals n multiplied by the least nontrivial number coprime to n. - Amarnath Murthy, Nov 20 2005

Crossrefs

Programs

  • Mathematica
    Table[n*Select[Prime[Range[Log2[n] + 1]], ! Divisible[n, #] &][[1]], {n, 61}] (* Ivan Neretin, May 21 2015 *)
  • PARI
    a(n) = forprime(p = 2, , if(n%p, return(n*p))); \\ Amiram Eldar, Feb 01 2025

Formula

a(n) = n*A053669(n).
A000005(a(n)) = 2*A000005(n) = A062011(n). - Reinhard Zumkeller, May 17 2006
Sum_{k=1..n} ~ c * n^2 / 2, where c = A249270. - Amiram Eldar, Feb 01 2025

A340469 First constant from family of prime-representing constants h_n (h1 = 1.2148208055...) such that ceiling(h_n) = prime(n).

Original entry on oeis.org

1, 2, 1, 4, 8, 2, 0, 8, 0, 5, 5, 2, 4, 3, 3, 3, 7, 4, 6, 9, 4, 5, 1, 3, 1, 2, 3, 4, 2, 2, 3, 7, 7, 0, 9, 5, 4, 2, 5, 9, 1, 5, 0, 2, 6, 0, 2, 1, 2, 2, 7, 2, 3, 9, 1, 5, 8, 0, 4, 1, 4, 6, 1, 9, 2, 9, 3, 8, 1, 3, 9, 9, 0, 9, 7, 9, 7, 6, 3, 2, 6, 0, 6, 0, 4, 0, 5, 9, 0, 6, 0, 3, 3, 3, 5, 5, 6, 2, 6, 5, 6, 3, 9, 0, 8
Offset: 1

Views

Author

Ilya Weinstein, Jan 08 2021

Keywords

Comments

The family of constants h_n (h1 = 1.2148208055...) for generation of the complete sequence of primes with using of a recursive relation for h_n such that ceiling(h_n) = prime(n). The recursive relation h_n = ceiling(h_{n-1})*(h_{n-1}-ceiling(h_{n-1})+2) generates the complete sequence of prime numbers. Constants h_n are irrational for all n.

Examples

			h1 = 1.21482080552433374694513123422377095425915026021227...
h2 = 2.42964161104866749389026246844754190851830052042454...
h3 = 4.28892483314600248167078740534262572555490156127363...
etc.
		

Crossrefs

Programs

  • Mathematica
    N[Sum[(Prime[k]-2)/Product[Prime[n],{n,1,k-1}],{k,1,150}],50]
  • PARI
    suminf(k=1, (prime(k)-2)/prod(i=1, k-1, prime(i))) \\ Michel Marcus, Jan 08 2021

Formula

h1 = Sum_{k>=1} (prime(k)-2)/Product_{i=1..k-1} prime(i).
Equals A249270 - A064648 - 1. - Antonio Graciá Llorente, Dec 22 2023

A339204 Decimal expansion of the generating constant for the Fibonacci numbers.

Original entry on oeis.org

2, 9, 5, 6, 9, 3, 8, 8, 9, 1, 3, 7, 7, 9, 8, 8, 0, 4, 9, 8, 3, 1, 6, 9, 0, 0, 9, 7, 9, 1, 1, 2, 0, 9, 2, 7, 8, 6, 9, 9, 1, 5, 8, 2, 3, 4, 3, 9, 3, 6, 2, 3, 5, 3, 4, 5, 7, 2, 4, 4, 6, 2, 7, 2, 3, 7, 5, 2, 7, 4, 6, 4, 4, 6, 6, 8, 3, 4, 6, 7, 6, 9, 3, 0, 4, 1, 7, 5
Offset: 1

Views

Author

A.H.M. Smeets, Nov 27 2020

Keywords

Comments

Inspired by the prime generating constant A249270, but here for the Fibonacci numbers, A000045(n); generating the Fibonacci numbers for n > 2.
The producing function is given by f' = floor(f)*(f-floor(f)+1), starting with this constant, f' denoting the next f, and floor(f) being the terms of the sequence produced by this constant.
The number of correct digits obtained from the first n terms from the series expansion for this constant as given in the formula section is roughly about (n^2)/10 (~ (3/7)*(log(Fib(n))^2)) decimal digits; i.e., for a binary representation, about (n^2)/3 binary digits.

Examples

			2.95693889137798804983169009791120927869915823439362...
		

Crossrefs

Cf. A000045 (Fibonacci).
Cf. A249270 (for primes), A339203 (for Mersenne prime exponents).

Programs

  • Maple
    with(combinat, fibonacci): evalf(Sum((fibonacci(n) - 1)/Product(fibonacci(k), k = 2..n-1), n = 3..infinity), 120); # Vaclav Kotesovec, Nov 29 2020
  • Mathematica
    Quiet[First[RealDigits[NSum[(Fibonacci[n] - 1)/Fibonorial[n - 1], {n, 3, Infinity}, Method -> {"WynnEpsilon", "ExtraTerms" -> 25}, NSumTerms -> 25, VerifyConvergence -> False, WorkingPrecision -> 105], 10, 100]], General::intnm] (* Jan Mangaldan, Nov 29 2020 *)
  • PARI
    suminf(n=3, (fibonacci(n)-1)/prod(k=2, n-1, fibonacci(k))) \\ Michel Marcus, Nov 27 2020
    
  • Python
    n, sumn, sumd, termd, f0, f1 = 0, 0, 1, 1, 1, 1
    while n < 33: # enough to obtain 100 digits
        n, sumn, sumd, termd, f0, f1 = n+1, sumn*termd+sumd*(f0-1), sumd*termd, termd*f0, f0+f1, f0
    pre, sumn, i, d = sumn//sumd, sumn%sumd, 0, ""
    while i < 100:
        dig, sumn, i = (10*sumn)//sumd, (10*sumn)%sumd, i+1
        d = d+str(dig)
    print(str(pre)+"."+d)

Formula

Equals Sum_{n > 2} (A000045(n)-1)/(Product_{k = 2..n-1} A000045(k)).

A356093 a(n) = numerator((prime(n)-1)/prime(n)#), where prime(n)# = A002110(n) is the n-th primorial.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 8, 3, 1, 2, 1, 6, 4, 1, 1, 2, 1, 2, 1, 1, 12, 1, 1, 4, 16, 10, 1, 1, 18, 8, 3, 1, 4, 1, 2, 5, 2, 27, 1, 2, 1, 6, 1, 32, 14, 3, 1, 1, 1, 2, 4, 1, 8, 25, 128, 1, 2, 9, 2, 4, 1, 2, 3, 1, 4, 2, 1, 8, 1, 2, 16, 1, 1, 2, 9, 1, 2, 6, 40, 4, 1, 2, 1
Offset: 1

Views

Author

Amiram Eldar, Jul 26 2022

Keywords

Comments

f(n) = a(n)/A356094(n) is the asymptotic density of numbers k such that prime(n) = A053669(k) is the smallest prime not dividing k.
The asymptotic mean of A053669 is 2.9200509773... (A249270) which is the weighted mean of the primes with f(n) as weights. The corresponding asymptotic standard deviation, which can be evaluated from the second raw moment Sum_{n>=1} f(n) * prime(n)^2, is 2.8013781465... .

Examples

			Fractions begin with 1/2, 1/3, 2/15, 1/35, 1/231, 2/5005, 8/255255, 3/1616615, 1/10140585, 2/462120945, ...
		

Crossrefs

Cf. A002110, A006093, A039787, A053669, A249270, A356094 (denominators).
Similar sequences: A038110, A338559, A340818, A341431, A342450, A342479.

Programs

  • Mathematica
    primorial[n_] := Product[Prime[i], {i, 1, n}]; Numerator[Table[(Prime[i] - 1)/primorial[i], {i, 1, 100}]]
  • PARI
    a(n) = numerator((prime(n)-1)/factorback(primes(n))); \\ Michel Marcus, Jul 26 2022
    
  • Python
    from math import gcd
    from sympy import prime, primorial
    def A356093(n): return (p:=prime(n)-1)//gcd(p,primorial(n)) # Chai Wah Wu, Jul 26 2022

Formula

a(n) = 1 iff prime(n) is in A039787.
Let f(n) = a(n)/A356094(n):
f(n) = A006093(n)/A002110(n).
Sum_{n>=1} f(n) = 1.
Sum_{n>=1} f(n) * prime(n) = A249270.

A381031 The second smallest prime not dividing n minus the smallest prime not dividing n.

Original entry on oeis.org

1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 5, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 6, 1, 2, 5, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 1, 2, 1, 2, 3, 8, 1, 2, 1, 2, 5, 2, 1, 2, 1, 4, 3, 2, 1, 6, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 9
Offset: 1

Views

Author

Antti Karttunen, Feb 12 2025

Keywords

Examples

			For n = 1, the least prime not dividing it is 2, and the second least prime not dividing is 3, thus a(1) = 3-2 = 1.
For n = 3, the least nondividing prime is 2, the second least nondividing prime is 5, thus a(3) = 5-2 = 3.
For n = 6 = 2*3, the least nondividing prime is 5, and the second least nondividing prime is 7, thus a(6) = 7-5 = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = 1, q = 1, c = 0}, While[c < 2, p = NextPrime[p]; If[! Divisible[n, p], c++; If[c == 1, q = p]]]; p-q]; Array[a, 105] (* Amiram Eldar, Feb 14 2025 *)
  • PARI
    A381031(n) = { my(c=0,e=0); forprime(p=2, , if(n%p, c++; if(1==c, e=p, if(2==c, return(p-e))))); };

Formula

a(n) = A380539(n) - A053669(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A381113 - A249270 = 2.239091... . - Amiram Eldar, Feb 14 2025

A381113 Decimal expansion of the asymptotic mean of the second smallest prime not dividing k, where k runs over the positive integers (A380539).

Original entry on oeis.org

5, 1, 5, 9, 1, 4, 2, 8, 5, 9, 6, 5, 1, 6, 4, 2, 0, 3, 0, 1, 3, 6, 5, 8, 0, 9, 7, 4, 5, 0, 1, 2, 5, 8, 1, 7, 2, 0, 0, 0, 7, 3, 0, 7, 2, 1, 4, 1, 9, 1, 6, 7, 9, 9, 3, 5, 0, 0, 6, 6, 3, 8, 8, 6, 6, 2, 4, 5, 4, 2, 4, 3, 7, 8, 8, 1, 0, 7, 1, 2, 1, 2, 1, 9, 9, 5, 3, 5, 3, 3, 9, 3, 6, 1, 5, 1, 0, 5, 0, 0, 1, 1, 9, 4, 9
Offset: 1

Views

Author

Amiram Eldar, Feb 14 2025

Keywords

Examples

			5.15914285965164203013658097450125817200073072141916...
		

Crossrefs

Cf. A002110, A007504, A249270 (analogous constant with smallest prime), A380539.

Programs

  • PARI
    primorial(k) = prod(i = 1, k, prime(i));
    primesum(k) = sum(i = 1, k, prime(i));
    suminf(k = 2, prime(k) * (prime(k)-1) * (primesum(k-1)-k+1) / primorial(k))

Formula

Equals lim_{m->oo} (1/m) * Sum_{k=1..m} A380539(k).
Equals Sum_{k>=2} prime(k) * (prime(k)-1) * (primesum(k-1)-k+1) / primorial(k), where primesum(k) = A007504(k) and primorial(k) = A002110(k).

A339203 Decimal expansion of the generating constant for the exponents of the Mersenne primes.

Original entry on oeis.org

2, 9, 3, 0, 0, 9, 4, 4, 4, 7, 2, 6, 8, 7, 9, 5, 7, 3, 6, 6, 7, 7, 9, 5, 2, 1, 8, 6, 9, 9, 0, 4, 3, 5, 7, 8, 5, 0, 5, 7, 6, 0, 1, 1, 6, 7, 1, 7, 9, 9, 9, 6, 4, 4, 3, 2, 3, 5, 0, 4, 4, 8, 1, 8, 2, 6, 8, 7, 4, 4, 4, 1, 7, 8, 3, 5, 9, 9, 4, 1, 0, 7, 8, 3, 2, 5, 8, 7
Offset: 1

Views

Author

A.H.M. Smeets, Nov 27 2020

Keywords

Comments

Inspired by the prime generating constant A249270, but here for the exponents of the Mersenne primes, A000043(n).
The producing function is given by f' = floor(f)*(f-floor(f)+1), starting with this constant, f' denoting the next f, and floor(f) being the next term of the sequence being produced by this constant.
Note that this constant is useless in trying to predict the next Mersenne prime exponent. A new known next Mersenne prime exponent will only enable us to calculate this constant more precisely.

Examples

			2.93009444726879573667795218699043578505760116717999...
		

Crossrefs

Cf. A000043.
Cf. A249270 (for primes), A339204 (for Fibonacci numbers).

Formula

Equals Sum_{n > 0} (A000043(n)-1)/(Product_{k = 1..n-1} A000043(k)).

A339412 a(n) = floor(x(n)) where x(n) = (frac(x(n-1))+1)*floor(x(n-1)) and x(1) = Pi.

Original entry on oeis.org

3, 3, 4, 5, 5, 7, 10, 10, 13, 17, 31, 35, 67, 123, 223, 305, 414, 822, 1550, 2224, 3273, 4560, 7804, 14372, 15493, 20080, 40039, 44226, 71916, 130773, 183760, 316165, 613602, 1066559, 1138668, 1202427, 2022144, 2251837, 2477524, 4479491, 7192184, 11256849
Offset: 1

Views

Author

Michael Turniansky, Dec 03 2020

Keywords

Comments

Inspired by A249270.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=1, Pi,
          (f-> (frac(f)+1)*floor(f))(b(n-1)))
        end:
    a:= n-> floor(b(n)):
    seq(a(n), n=1..50);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    Block[{a = {Pi}, $MaxExtraPrecision = 10^3}, Do[AppendTo[a, (FractionalPart[#] + 1) Floor[#]] &@ a[[-1]], 41]; Floor /@ a] (* Michael De Vlieger, Dec 04 2020 *)
  • NARS2000
    {(⌊{(⌊⍵)×1+1|⍵}⍣⍵)○1x}¨0,⍳100
    
  • PARI
    lista(nn) = {localprec(500); my(vx = vector(nn)); vx[1] = Pi; for (n=2, nn, vx[n] = (frac(vx[n-1])+1)*floor(vx[n-1]);); apply(floor, vx);} \\ Michel Marcus, Dec 03 2020

A339764 Decimal expansion of Varona's constant = Sum_{k >= 1} prime(k)/2^(k + k!).

Original entry on oeis.org

6, 9, 7, 2, 6, 5, 6, 5, 1, 0, 7, 7, 0, 3, 2, 0, 8, 9, 2, 3, 3, 3, 9, 8, 4, 3, 7, 5, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 8, 6, 0, 8, 7, 5, 7, 1, 8, 0, 9, 0, 3, 2, 5, 1, 7, 5, 3, 1, 2, 2, 0, 3, 8, 1, 8, 8, 8, 9, 4, 0, 4, 9, 1, 2, 0, 1, 0, 6, 4, 2, 2, 4, 8, 9, 8, 5, 9, 2, 5, 4, 7, 3, 1, 9, 2, 5, 3, 7, 5, 3, 8, 1, 2, 5, 1, 7, 9, 7, 0, 8, 0, 0, 3, 9, 9, 7, 8, 0, 2, 7, 3, 4, 3, 7, 5, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

Varona's constant v is transcendental and generates the primes via prime(1)=2=floor(4*v) and for n>1 prime(n) = floor(v*2^(n+n!)) - 2^(1+n!-(n-1)!)*floor(v*2^(n-1+(n-1)!)).

Examples

			0.69726565107703208923339843750000000025860875718090325175312203818889
		

Crossrefs

Programs

  • Mathematica
    First@RealDigits@N[Sum[Prime[i]/2^(i + i!), {i, 1, 12}], 300]
  • PARI
    suminf(k=1, prime(k)/2^(k + k!)) \\ Michel Marcus, Dec 21 2020

A377010 Decimal expansion of the asymptotic mean of A376928: lim_{m->oo} (1/m) * Sum_{k=1..m} A376928(k).

Original entry on oeis.org

1, 7, 4, 4, 6, 6, 3, 4, 0, 5, 0, 1, 7, 4, 0, 1, 9, 2, 3, 4, 5, 7, 3, 0, 8, 8, 8, 3, 5, 2, 5, 8, 1, 7, 0, 3, 5, 9, 8, 5, 7, 0, 0, 5, 0, 4, 3, 6, 4, 0, 9, 0, 6, 1, 6, 6, 7, 2, 2, 3, 3, 0, 0, 7, 9, 4, 1, 1, 3, 3, 3, 1, 0, 2, 8, 5, 9, 8, 4, 6, 5, 6, 2, 1, 1, 8, 7, 2, 6, 0, 8, 6, 6, 3, 1, 7, 1, 2, 7, 6, 2, 9, 9, 0, 2
Offset: 1

Views

Author

Amiram Eldar, Oct 12 2024

Keywords

Examples

			1.74466340501740192345730888352581703598570050436409...
		

Crossrefs

Programs

  • PARI
    \p 120
    f(k) = prod(i = 1, k, prime(i));
    1/2 + suminf(k = 1, prime(k) * (1/f(k) - 1/f(k+1)))

Formula

Equals 1/2 + Sum_{p prime} p * (1/p# - 1/nextprime(p)#), where nextprime(p) = A151800(p) and p# = A034386(p).
Equals 1/2 + Sum_{k>=1} prime(k) * (1/A002110(k) - 1/A002110(k+1)).
Previous Showing 11-20 of 23 results. Next