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: Jan Fricke

Jan Fricke's wiki page.

Jan Fricke has authored 10 sequences.

A180634 Numbers n such that the discriminant of the n-th cyclotomic polynomial is a square.

Original entry on oeis.org

1, 2, 8, 12, 15, 16, 20, 21, 24, 28, 30, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 51, 52, 55, 56, 57, 60, 63, 64, 65, 66, 68, 69, 70, 72, 75, 76, 77, 78, 80, 84, 85, 87, 88, 90, 91, 92, 93, 95, 96, 99, 100
Offset: 1

Author

Jan Fricke, Sep 13 2010

Keywords

Comments

A number n is in this sequence if the Galois group of the n-th cyclotomic polynomial over the rationals contains only even permutations.
Essentially the same as A033949. - R. J. Mathar, Oct 15 2011
Also, numbers n such that the product of the elements in the group Z_n of invertible elements mod n (i.e., the product mod n of x such that 1 <= x < n and x is coprime to n) is 1. An equivalent characterization of the latter (apart from n=2): n such that the number of square roots of 1 mod n is divisible by 4. (See comments at A033949). - Robert Israel, Dec 08 2014
To see this, use Gauss's generalization of Wilson's theorem namely, the product of the units of Z_n is -1 if n is 4 or p^i or 2p^i for odd primes p, i >0, and is equal to 1 otherwise. - W. Edwin Clark, Dec 09 2014

Examples

			n=5: The 5th cyclotomic polynomial is x^4+x^3+x^2+x+1 with discriminant 125, which is not a square. The Galois group is generated by (1243), that is an odd permutation. Hence 5 is not in the sequence. n=8: The 8th cyclotomic polynomial is x^4+1 with discriminant 256, which is a square. The Galois group is {id,(13)(57),(15)(37),(17)(35)}, that are all even permutations. Hence 8 is in the sequence.
		

Crossrefs

Programs

  • Maple
    m := proc(n) local k, r; r := 1;
    for k from 1 to n do if igcd(n,k) = 1 then r := modp(r*k,n) fi od; r end:
    [1, op(select(n -> m(n) = 1, [$1..100]))]; # Peter Luschny, May 25 2017
  • Mathematica
    fQ[n_] := IntegerQ@ Sqrt@ Discriminant[ Cyclotomic[ n, x], x]; Select[ Range@ 100, fQ] (* Robert G. Wilson v, Dec 10 2014 *)
  • PARI
    for(n=1,100,if(issquare(poldisc(polcyclo(n))),print(n)))

A152925 a(n) = smallest number m such that in 1,2,..,m written in base n, no two of the n digits occurs the same number of times.

Original entry on oeis.org

1, 5, 13, 47, 105, 536, 1341, 9231, 24697, 212594, 592269, 6100559, 17464969, 209215572, 610839805, 8338210079, 24709115769, 378460880126
Offset: 2

Author

Jan Fricke, Dec 15 2008

Keywords

Examples

			In base 5 in 1,2,..,142_5 = 47, digit 1 occurs 43 times, 2 occurs 20, 3 occurs 19 times, 4 occurs 17 times, and 0 occurs 14.
		

Programs

  • Python
    def different(d):
        for i in range(len(d)):
            for j in range(i):
                if d[i] == d[j]:
                    return False
        return True
    def a(base):
        d = [0] * base
        n = 0
        while True:
            n += 1
            m = n
            while m > 0:
                d[m % base] += 1
                m //= base
            if different(d):
                break
        return n

Extensions

Edited by Franklin T. Adams-Watters, Sep 11 2011
a(16)-a(19) from Michael S. Branicky, Mar 26 2022

A127699 Length of period of the sequence (1^1^1^..., 2^2^2^..., 3^3^3^..., 4^4^4^..., ...) modulo n.

Original entry on oeis.org

1, 2, 6, 4, 20, 6, 42, 8, 18, 20, 220, 12, 156, 42, 60, 16, 272, 18, 342, 20, 42, 220, 5060, 24, 100, 156, 54, 84, 2436, 60, 1860, 32, 660, 272, 420, 36, 1332, 342, 156, 40, 1640, 42, 1806, 220, 180, 5060, 237820, 48, 294, 100, 816, 156, 8268, 54, 220, 168
Offset: 1

Author

Jan Fricke, Apr 11 2007

Keywords

Comments

For any positive integers a and m the sequence a, a^a, a^a^a, a^a^a^a,... becomes eventually constant modulo m. So the remainder of a^a^a^... modulo n is well-defined.
Shapiro and Shapiro treat this problem. - T. D. Noe, Jan 30 2009

Examples

			a(10)=20 because the last digit of 1^1^1^.. is 1; the sequence 2,2^2,2^2^2,.. ends with 2,4,6,6,...; the sequence 3,3^3,3^3^3,... with 3,7,7,...; 4,4^4,4^4^4,... with 4,6,6,...; and so on. We get as last digits 1,6,7,6,5,6,3,6,9,0, 1,6,3,6,5,6,7,6,9,0 and then the pattern repeats.
		

Crossrefs

Cf. A002322.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=1, 1,
          ilcm(n, a(numtheory[lambda](n))))
        end:
    seq(a(n), n=1..56);  # Alois P. Heinz, Jan 03 2023
  • Mathematica
    nn=100; a=Table[0,{nn}]; a[[1]]=1; Do[a[[n]]=LCM[n,a[[CarmichaelLambda[n]]]], {n,2,nn}]; a (* T. D. Noe, Jan 30 2009 *)
  • Python
    from functools import lru_cache
    from math import lcm
    from sympy import reduced_totient
    @lru_cache(maxsize=None)
    def A127699(n): return 1 if n == 1 else lcm(n, A127699(reduced_totient(n))) # Chai Wah Wu, Jan 03 2023

Formula

a(n) = lcm(n, a(lambda(n))), where lambda is Carmichael's reduced totient function. - T. D. Noe, Jan 30 2009

Extensions

Extension and correction from T. D. Noe, Jan 30 2009
Incorrect formula removed by T. D. Noe, Feb 02 2009

A119486 Numbers of children for which there is a subset which cannot be generated by a counting-out game.

Original entry on oeis.org

9, 12, 15, 18, 20, 21, 24, 25, 27, 28, 30, 33
Offset: 1

Author

Jan Fricke, May 23 2006

Keywords

Comments

The numbers were generated by an exhaustive search via a C-program.

Examples

			For 9 children 1,2,3,4,5,6,7,8,9, there is no possibility to select 3,4,6,7 (in any order) by a counting-out game, e.g. for selecting 3,4,6,7 the count-to number has to be 3 mod 9, 1 mod 8, 2 mod 7 and 1 mod 6, which is impossible.
		

Crossrefs

Complement of A119485.

Formula

Conjecture (by J. Fricke and G. Woeginger): The sequence contains all numbers n with an odd prime divisor p satisfying n/p>2.

A119485 Number of children for which any subset can be generated by a counting-out game.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 14, 16, 17, 19, 22, 23, 26, 29, 31, 32
Offset: 1

Author

Jan Fricke, May 23 2006

Keywords

Comments

The numbers were generated by an exhaustive search via a C-program.

Examples

			Having 6 children 1,2,3,4,5,6, then the children 2,4,6 can be counted-out by counting to 42: first selected child is 6, then 2 and finally 4.
		

Crossrefs

Complement of A119486.

Formula

Conjecture (by J. Fricke and G. Woeginger): The sequence contains exactly: powers of 2, primes and doubled primes.

A074051 For each n there are uniquely determined numbers a(n) and b(n) and a polynomial p_n(x) such that for all integers m we have Sum_{i=1..m}i^n(i+1)! = a(n)*Sum_{i=1..m} (i+1)! + p_n(m)*(m+2)! + b(n). The sequence b(n) is A074052.

Original entry on oeis.org

1, -1, 0, 3, -7, 0, 59, -217, 146, 2593, -15551, 32802, 160709, -1856621, 7971872, 1299951, -287113779, 2262481448, -7275903849, -36989148757, 698330745002, -4867040141851, 10231044332629, 184216198044034, -2679722886596295, 17971204188130391, -17976259717948832
Offset: 0

Author

Jan Fricke, Aug 14 2002

Keywords

Comments

If a(n)=0 then Sum_{i>=1}i^n(i+1)! = b(n) in the p-adic numbers. The only known numbers n with a(n)=0 are 2 and 5.
a(n)*(-1)^n gives the alternating row sums of the Sheffer triangle A143494 (2-restricted Stirling2). - Wolfdieter Lang, Oct 06 2011

Examples

			a(2)=0 because Sum_{i=1..m}i^2(i+1)! = (m-1)(m+2)!+2.
a(3)=3 because Sum_{i=1..m}i^3(i+1)! = 3*Sum_{i=1..m}(i+1)!+(m^2-m-1)(m+2)!+2.
		

Crossrefs

Programs

  • Maple
    alias(S2 = combinat[stirling2]);
    A074051 := proc(n) local k;
    1 + add((-1)^(n+k) * (S2(n+1, k+1) - S2(n+2, k+1)), k = 0..n) end:
    seq(A074051(i), i = 0..26); # Peter Luschny, Apr 17 2011
  • Mathematica
    A[a_] := Module[{p, k}, p[n_] = 0; For[k = a - 1, k >= 0, k--, p[n_] = Expand[p[n] + n^k Coefficient[n^a - (n + 2)p[n] + p[n - 1], n^(k + 1)]] ]; Expand[n^a - (n + 2)p[n] + p[n - 1]] ]
    (* Second program: *)
    a[n_] := (-1)^n (BellB[n+2, -1] - BellB[n+1, -1]);
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 21 2018, after Peter Luschny *)
  • Python
    from itertools import accumulate
    def A074051_list(size):
        if size < 1: return []
        L, accu = [], [1]
        for n in range(size-1):
            accu = list(accumulate([-accu[-1]] + accu))
            L.append(-(-1)**n*accu[-2])
        return L
    print(A074051_list(28)) # Peter Luschny, Apr 25 2016

Formula

From Vladeta Jovovic, Jan 27 2005: (Start)
Second inverse binomial transform of A000587.
E.g.f.: exp(1 - 2*x - exp(-x)).
G.f.: Sum_{k >= 0}((x/(1+2*x))^k/Product_{l=0..k}(1 + l*x/(1+2*x)))/(1+2*x).
a(n) = Sum_{k=0..n} (-1)^(n-k)*(k^2-3*k+1)*Stirling2(n, k). (End)
a(n) = (-1)^n*(A000587(n+2)-A000587(n+1)). - Peter Luschny, Apr 17 2011
From Sergei N. Gladkovskii, Sep 28 2012 to Apr 22 2013: (Start)
Continued fractions:
G.f.: 1/U(0) where U(k)= x*k + 1 + x + x^2*(k+1)/U(k+1).
G.f.: -1/U(0) where U(k)= -x*k - 1 - x + x^2*(k+1)/U(k+1).
G.f.: 1/(U(0) - x) where U(k)= 1 + x + x*(k+1)/(1 - x/U(k+1)).
G.f.: 1/(U(0) + x) where U(k)= 1 + x*(2*k+1) - x*(k+1)/(1 + x/U(k+1)).
G.f.: 1/G(0) where G(k)= 1 + 2*x/(1 + 1/(1 + 2*x*(k+1)/G(k+1))).
G.f.: 1 - 2*x/(G(0) + 2*x) where G(k)= 1 + 1/(1 + 2*x*(k+1)/(1 + 2*x/G(k+1))).
G.f.: (G(0) - 1)/(x-1) where G(k) = 1 - 1/(1+k*x+2*x)/(1-x/(x-1/G(k+1))).
G.f.: (G(0)-2-2*x)/x^2 where G(k) = 1 + 1/(1+k*x)/(1-x/(x+1/G(k+1) )).
G.f.: (S-2-2*x)/x^2 where S = sum(k>=0, (2 + x*k)*x^k/prod(i=0..k, (1+x*i))).
G.f.: (G(0)-2)/x where G(k) = 1 + 1/(1+k*x+x)/(1-x/(x+1/G(k+1))).
G.f.: (1+x)/x/Q(0) - 1/x, where Q(k)= 1 + x - x/(1 + x*(k+1)/Q(k+1)). (End)
a(n) = exp(1) * (-1)^n * Sum_{k>=0} (-1)^k * (k+2)^n / k!. - Ilya Gutkovskiy, Sep 02 2021

Extensions

More terms from Vladeta Jovovic, Jan 27 2005

A081257 a(n) is the greatest prime factor of (n^3 - 1).

Original entry on oeis.org

7, 13, 7, 31, 43, 19, 73, 13, 37, 19, 157, 61, 211, 241, 13, 307, 17, 127, 421, 463, 13, 79, 601, 31, 37, 757, 271, 67, 29, 331, 151, 1123, 397, 97, 43, 67, 1483, 223, 547, 1723, 139, 631, 283, 109, 103, 61, 181, 43, 2551, 379, 919, 409, 2971, 79, 103, 3307, 163
Offset: 2

Author

Jan Fricke, Mar 14 2003

Keywords

Comments

The record values here (as well as those for A081256) appear to match the terms of A002383 for n > 1. - Bill McEachen, Jun 19 2023

Examples

			a(7)=19 because 7^3 - 1 = 342 = 2*3*3*19.
		

Crossrefs

Cf. A096175 (n^3-1 is an odd semiprime), A096176 ((n^3-1)/(n-1) is prime).

Programs

Formula

a(n) = A006530(A068601(n)). - Michel Marcus, Jun 19 2023

Extensions

More terms from Hugo Pfoertner, Jun 21 2004

A081258 Numbers k > 1 such that k^3 - 1 (or equivalently k^2 + k + 1) has no prime factor greater than k.

Original entry on oeis.org

16, 18, 22, 30, 49, 67, 68, 74, 79, 81, 87, 100, 102, 121, 135, 137, 146, 149, 154, 158, 159, 163, 165, 169, 172, 178, 181, 191, 211, 221, 229, 230, 235, 256, 262, 263, 269, 273, 277, 291, 292, 301, 305, 313, 315, 324, 326, 334, 352, 361, 372, 373, 380, 393
Offset: 1

Author

Jan Fricke, Mar 14 2003

Keywords

Comments

One might also include 1 as a term here. - R. J. Mathar, Oct 11 2011

Examples

			16 is a term: 16^3 - 1 = 4095 = 3*3*5*7*13.
		

Crossrefs

Programs

  • Maple
    isA081258 := proc(n)
            numtheory[factorset](n^3-1) ;
            if max(op(%)) <= n then
                    true;
            else
                    false;
            end if;
    end proc;
    for n from 1 to 400 do
            if isA081258(n) then
                    printf("%d,",n);
            end if;
    end do: # R. J. Mathar, Oct 11 2011
  • Mathematica
    Select[Range[2, 1000], FactorInteger[#^3 - 1][[-1, 1]] <= #&] (* Jean-François Alcover, Jun 15 2020 *)

Extensions

Name changed by Robert Israel, Nov 11 2016

A081256 Greatest prime factor of n^3 + 1.

Original entry on oeis.org

2, 3, 7, 13, 7, 31, 43, 19, 73, 13, 37, 19, 157, 61, 211, 241, 13, 307, 7, 127, 421, 463, 13, 79, 601, 31, 37, 757, 271, 67, 19, 331, 151, 1123, 397, 97, 43, 67, 1483, 223, 547, 1723, 139, 631, 283, 109, 103, 61, 181, 43, 2551, 379, 919, 409, 2971, 79, 103, 3307, 163
Offset: 1

Author

Jan Fricke, Mar 14 2003

Keywords

Comments

Record values appear to match the terms of A002383 for n>1. - Bill McEachen, Oct 18 2023

Programs

  • Maple
    A081256 := proc(n)
        A006530(n^3+1) ;
    end proc:
    seq(A081256(n),n=1..20) ; # R. J. Mathar, Feb 13 2014
  • Mathematica
    Table[Max[Transpose[FactorInteger[n^3 + 1]][[1]]], {n, 25}]
  • PARI
    a(n)=my(f=factor(n^3+1)); f[#f~,1] \\ Charles R Greathouse IV, Mar 08 2017
    
  • PARI
    A081256(n)=vecmax(factor(n^3+1)[,1]) \\ It seems slightly slower to get the last element using ...[-1..-1][1]. - M. F. Hasler, Jun 15 2018

Formula

a(n) = A006530(A001093(n)). - M. F. Hasler, Jun 13 2018
a(n) >= 31 for n >= 70 (Buchmann et al., 1991). - Amiram Eldar, Oct 25 2024

Extensions

More terms from Harvey P. Dale, Mar 22 2003
More terms from Hugo Pfoertner, Jun 20 2004

A074052 The lowest order term in an expansion of Sum_{i=1..m} i^n*(i+1)! in a special factorial basis.

Original entry on oeis.org

0, -2, 2, 2, -14, 26, 34, -398, 1210, 450, -23406, 118634, -166286, -1983342, 18159658, -68002894, -112926670, 3497644570, -24969255550, 64943618962, 607880756218, -9318511004702, 60525142971954, -80108659182870, -3000122066181358
Offset: 0

Author

Jan Fricke, Aug 14 2002

Keywords

Comments

For each n there unique numbers a(n) and b(n) and a polynomial p_n such that for all integers m: Sum_{i=1..m} i^n * (i+1)! = a(n) + b(n) * Sum_{i=1..m}(i+1)! + p_n(m)*(m+2)! The sequence b(n) is A074051(n), and this sequence here are the a(n).

Examples

			a(0) = 0 because Sum_{i=1..m} (i+1)! = 0 + 1*Sum_{i=1..m} (i+1)! + 0*(m+2)!.
a(1) = -2 because Sum_{i=1..m} i*(i+1)! = -2 -1*Sum_{i=1..m} (i+1)! + 1*(m+2)!.
a(2) = 2 because Sum_{i=1..m} i^2*(i+1)! = 2 +0*Sum_{i=1..m} (i+1)! + (m-1)*(m+2)!.
a(3) = 2 because Sum_{i=1..n} i^3*(i+1)! = 2 +3*Sum_{i=1..m} (i+1)! + (m^2-m-1)*(m+2)!.
a(4)=-14 because Sum_{i=1..n} i^4*(i+1)! = -14 -7*Sum_{i=1..n} (i+1)! + (m^3-m^2-2*m+7)*(m+2)!.
		

Crossrefs

Programs

  • Mathematica
    A[a_] := Module[{p, k}, p[n_] = 0; For[k = a - 1, k >= 0, k--, p[n_] = Expand[p[n] + n^k Coefficient[n^a - (n + 2)p[n] + p[n - 1], n^(k + 1)]] ]; -2 p[0] ]

Extensions

More terms from R. J. Mathar, Oct 11 2011