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.

User: Matthew Campbell

Matthew Campbell's wiki page.

Matthew Campbell has authored 27 sequences. Here are the ten most recent ones:

A316346 a(n) = A316297(n+1)/A316297(n).

Original entry on oeis.org

4, 9, 8, 25, 2, 49, 16, 81, 10, 121, 12, 169, 14, 15, 32, 289, 6, 361, 4, 7, 22, 529, 72, 625, 26, 243, 28, 841, 30, 961, 64, 3, 34, 35, 36, 1369, 38, 39, 40, 1681, 6, 1849, 484, 45, 46, 2209, 48, 2401, 50, 51, 52, 2809, 18, 55, 56, 57, 58, 3481, 60, 3721, 62
Offset: 1

Author

Matthew Campbell, Jun 29 2018

Keywords

Examples

			a(3) = A316297(4)/A316297(3) = 288/36 = 8.
		

Crossrefs

Cf. A316297.

Programs

  • Mathematica
    #[[2]]/#[[1]]&/@Partition[Array[#! Denominator[HarmonicNumber[#]]&,70], 2,1] (* Harvey P. Dale, Jun 12 2019 *)

A316297 a(n) = n! times the denominator of the n-th harmonic number H(n).

Original entry on oeis.org

1, 4, 36, 288, 7200, 14400, 705600, 11289600, 914457600, 9144576000, 1106493696000, 13277924352000, 2243969215488000, 31415569016832000, 471233535252480000, 15079473128079360000, 4357967734014935040000, 26147806404089610240000, 9439358111876349296640000
Offset: 1

Author

Matthew Campbell, Jun 29 2018

Keywords

Examples

			a(4) = 4! * A002805(4) = 24 * 12 = 288.
		

Programs

  • Maple
    H:= proc(n) H(n):= 1/n +`if`(n=1, 0, H(n-1)) end:
    a:= n-> denom(H(n))*n!:
    seq(a(n), n=1..20);  # Alois P. Heinz, Jul 21 2018
  • Mathematica
    a[n_] := n! Denominator@HarmonicNumber@n; Array[a, 18] (* Robert G. Wilson v, Jun 30 2018 *)
  • PARI
    a(n) = n! * denominator(sum(k=1, n, 1/k)); \\ Michel Marcus, Aug 12 2018

Formula

a(n) = A000142(n) * A002805(n).

A280420 Product of divisors of n!.

Original entry on oeis.org

1, 1, 2, 36, 331776, 42998169600000000, 7244150201408990671659859968000000000000000, 1182813011613388022005884215741990164001544397058025540221953280041975323323006976000000000000000000000000000000
Offset: 0

Author

Matthew Campbell, Jan 02 2017

Keywords

Crossrefs

Programs

  • Maple
    A280420 := proc(n)
        mul(d,d=numtheory[divisors](n!)) ;
    end proc: # R. J. Mathar, Jan 04 2017
  • Mathematica
    Table[(n!)^(DivisorSigma[0, n!]/2), {n, 0, 10}]
  • Python
    from math import isqrt, factorial
    from sympy import divisor_count
    def A280420(n): return (lambda m:isqrt(m)**c if (c:=divisor_count(m)) & 1 else m**(c//2))(factorial(n)) # Chai Wah Wu, Jun 25 2022

Formula

a(n) = A007955(A000142(n)).
a(n) = (n!)^(d(n!)/2) = (A000142(n))^(A000005(A000142(n))/2).

A280409 Primes in the order that they appear in A280408, without repetitions.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 13, 23, 53, 19, 29, 41, 31, 47, 71, 107, 137, 103, 233, 263, 593, 167, 251, 283, 479, 719, 1619, 911, 1367, 577, 433, 61, 37, 59, 89, 67, 101, 43, 83, 73, 113, 79, 179, 269, 131, 197, 97, 149, 109, 173, 139, 157, 127, 191, 431, 647, 971
Offset: 1

Author

Matthew Campbell, Jan 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    DeleteDuplicates@ Flatten@ Table[Select[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # > 1 &], PrimeQ], {n, 200}] (* Michael De Vlieger, Jan 02 2017 *)

A280408 Irregular triangle read by rows listing the prime numbers that appear from the trajectory of n in Collatz Problem.

Original entry on oeis.org

2, 2, 3, 5, 2, 2, 5, 2, 3, 5, 2, 7, 11, 17, 13, 5, 2, 2, 7, 11, 17, 13, 5, 2, 5, 2, 11, 17, 13, 5, 2, 3, 5, 2, 13, 5, 2, 7, 11, 17, 13, 5, 2, 23, 53, 5, 2, 2, 17, 13, 5, 2, 7, 11, 17, 13, 5, 2, 19, 29, 11, 17, 13, 5, 2, 5, 2, 2, 11, 17, 13, 5, 2, 23, 53, 5, 2, 3, 5, 2, 19, 29, 11, 17, 13, 5, 2
Offset: 1

Author

Matthew Campbell, Jan 02 2017

Keywords

Examples

			The irregular array a(n,k) starts:
n\k   1   2   3   4   5   6
...
1:    2
2:    2
3:    3   5   2
4:    2
5:    5   2
6:    3   5   2
7:    7  11  17  13   5   2
8:    2
9:    7  11  17  13   5   2
10:   5  2
11:  11  17  13   5   2
12:   3   5   2
13:  13   5   2
14:   7  11  17  13   5   2
15:  23  53   5   2
		

Crossrefs

Programs

  • Mathematica
    Table[Select[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # > 1 &], PrimeQ], {n, 2, 30}] // Flatten (* Michael De Vlieger, Jan 02 2017 *)
  • Python
    from sympy import isprime
    def a(n):
        if n==1: return [2]
        l=[n, ]
        while True:
            if n%2==0: n//=2
            else: n = 3*n + 1
            l+=[n, ]
            if n<2: break
        return list(filter(lambda i: isprime(i), l))
    for n in range(1, 21): print(a(n)) # Indranil Ghosh, Apr 14 2017

A280327 a(n) is obtained by applying the map k -> composite(k) n times, starting at n.

Original entry on oeis.org

4, 12, 25, 39, 60, 94, 133, 183, 236, 320, 415, 520, 640, 805, 1007, 1212, 1463, 1800, 2144, 2562, 3021, 3523, 4135, 4840, 5747, 6630, 7701, 9057, 10392, 11812, 13519, 15400, 17534, 19827, 22564, 25624, 29206, 32998, 37041, 41819, 46659, 53223, 59345, 66104, 73368, 81897, 91157, 100827, 112045
Offset: 1

Author

Matthew Campbell, Dec 31 2016

Keywords

Examples

			a(3) is 25 because the third composite is 8, the eighth composite is 15, and for the 3rd iteration, the fifteenth composite is 25.
To get a(4): 4 -> 9 -> 16 -> 26 -> 39.
		

Crossrefs

Cf. A002808.
For primes, see A058009.

Programs

  • Mathematica
    c = Select[Range[10^6], CompositeQ]; Table[Nest[c[[#]] &, n, n], {n, 50}] (* Michael De Vlieger, Dec 31 2016 *)

Extensions

More terms from Michael De Vlieger, Dec 31 2016

A274472 Number of iterations of the Collatz recursion required to reach a prime number.

Original entry on oeis.org

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

Author

Matthew Campbell, Jun 24 2016

Keywords

Comments

If n is prime then a(n)=0. If n is composite then a(n)=A280929(n). - Dmitry Kamenetsky, Jan 11 2017

Crossrefs

Programs

  • Mathematica
    Table[Length@ NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, ! PrimeQ@ # &] - 1, {n, 120}] (* Michael De Vlieger, Jun 26 2016 *)
  • PARI
    a(n) = my(i=0, k=n); while(!ispseudoprime(k), if(k%2==0, k=k/2, k=3*k+1); i++); i
    for(n=1, 87, print1(a(n), ", ")) \\ Felix Fröhlich, Jun 24 2016

Extensions

More terms from Felix Fröhlich, Jun 24 2016

A260624 a(n) = arithmetic derivative of the n-th composite number.

Original entry on oeis.org

4, 5, 12, 6, 7, 16, 9, 8, 32, 21, 24, 10, 13, 44, 10, 15, 27, 32, 31, 80, 14, 19, 12, 60, 21, 16, 68, 41, 48, 39, 25, 112, 14, 45, 20, 56, 81, 16, 92, 22, 31, 92, 33, 51, 192, 18, 61, 72, 26, 59, 156, 39, 55, 80, 18, 71, 176, 108, 43, 124, 22, 45, 32, 140, 123
Offset: 1

Author

Matthew Campbell, Oct 06 2015

Keywords

Examples

			The second composite number is 6. 6 = 2 * 3. 6' = 2*3' + 3*2' = 3 * 1 + 2 * 1 = 3 + 2 = 5, so a(2) = 5.
		

Crossrefs

Cf. A002808 (composite), A003415 (n').
Cf. A001787 ((2^n)'), A068719 ((2*n)'), A068720 ((n^2)'), A068721 ((n^3)').

Programs

  • Mathematica
    lim = 120; f[n_] := If[Abs@ n < 2, 0, n Total[#2/#1 & @@@ FactorInteger[Abs@ n]]]; f /@ Rest@ Complement[Range@ lim, Prime@ Range@ PrimePi@ lim] (* Michael De Vlieger, Oct 07 2015, after Michael Somos at A003415 *)
  • PARI
    forcomposite(n=1, 100, if((a(n) = local(fac); if(n<1, 0, fac=factor(n); sum(i=1, matsize(fac)[1], n*fac[i, 2]/fac[i, 1]))), print1(a(n)", "))); \\ Altug Alkan, Oct 06 2015

Formula

a(n) = A003415(A002808(n)).

Extensions

More terms from Altug Alkan, Oct 06 2015

A260623 Decimal expansion of the real solution x to zeta(x) - primezeta(x) = 2.

Original entry on oeis.org

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

Author

Matthew Campbell, Oct 06 2015

Keywords

Comments

This is also the solution x to Sum_{c composite}(1/c^x) = 1.

Examples

			1.4257...
		

Crossrefs

For the prime analog, see A243350.

Programs

  • Mathematica
    x /. FindRoot[Zeta[x] - PrimeZetaP[x] == 2, {x, 3/2}, WorkingPrecision -> 100] // RealDigits // First (* Jean-François Alcover, May 07 2021 *)
  • PARI
    solve(x=1.1, 2, zeta(x) - sumeulerrat(1/p, x) - 2) \\ Michel Marcus, May 07 2021

Extensions

a(6) corrected and a(7)-a(87) added by Hiroaki Yamanouchi, Nov 12 2015

A260621 Let b(k, n) = number obtained when the map x->A002808(x) is applied k times to n; a(n) is the smallest k such that b(k, n) + 1 is prime.

Original entry on oeis.org

1, 1, 12, 2, 1, 1, 3, 11, 1, 1, 7, 9, 1, 2, 10, 4, 2, 1, 1, 6, 8, 3, 3, 1, 9, 3, 1, 1, 18, 3, 1, 5, 7, 2, 2, 1, 4, 8, 2, 14, 1, 1, 6, 17, 2, 6, 1, 4, 6, 1, 1, 2, 2, 3, 7, 1, 13, 6, 1, 4, 16, 5, 16, 1, 5, 31, 35, 3, 5, 2, 1, 2, 3, 1, 1, 2, 6, 1, 1, 12, 5, 1, 2
Offset: 1

Author

Matthew Campbell, Sep 25 2015

Keywords

Comments

a(n) is also the smallest value of k at which b(k, n+1) - b(k, n) > 1.

Examples

			When n = 3, writing Composite(x) for A002808(x):
1. Composite(3) = 8. 8 + 1 = 9 = 3^2. 9 is not prime.
2. Composite(8) = 15. 15 + 1 = 16 = 2^4. 16 is not prime.
3. Composite(15) = 25. 25 + 1 = 26 = 2*13. 26 is not prime.
4. Composite(25) = 38. 38 + 1 = 39 = 3*13. 39 is not prime.
5. Composite(38) = 55. 55 + 1 = 56 = 2^3*7. 56 is not prime.
6. Composite(55) = 77. 77 + 1 = 78 = 2*3*13. 78 is not prime.
7. Composite(77) = 105. 105 + 1 = 106 = 2*53. 106 is not prime.
8. Composite(105) = 140. 140 + 1 = 141 = 3*47. 141 is not prime.
9. Composite(140) = 183. 183 + 1 = 184 = 2^3*23. 184 is not prime.
10. Composite(183) = 235. 235 + 1 = 236 = 2^2*59. 236 is not prime.
11. Composite(235) = 298. 298 + 1 = 299 = 13*23. 299 is not prime.
12. Composite(298) = 372. 372 + 1 = 373. 373 is prime.
--------------------------------------------------------------
Since the composite function was applied 12 times, a(3)=12.
		

Crossrefs

Primes and nonprimes: A000040, A002808, A008578, A018252.
a(1) = p, a(n+1) = a(n)-th composite number: A006508, A022450, A022451, A025010, A025011, A059407, A059408.
Composites with order n > 1: A050435, A050436, A050438, A050439, A050440.
Composites with order n = b, n >= 1: A022449.
Composites with prime subscripts: A065858.
Composites without prime subscripts: A175251.
Order of compositeness: A059981, A236536.
Prime(n)-1: A006093.

Programs

  • Mathematica
    c = Select[Range[10^5], CompositeQ]; Table[k = 1; While[! PrimeQ[Nest[c[[#]] &, n, k] + 1], k++]; k, {n, 120}] (* Michael De Vlieger, Jul 15 2016 *)

Extensions

Terms from a(12) onward from Jon E. Schoenfield, Sep 27 2015