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

A276919 Number of solutions to x^3 + y^3 + z^3 + t^3 == 1 (mod n) for 1 <= x, y, z, t <= n.

Original entry on oeis.org

1, 8, 27, 64, 125, 216, 336, 512, 1296, 1000, 1331, 1728, 1794, 2688, 3375, 4096, 4913, 10368, 7410, 8000, 9072, 10648, 12167, 13824, 15625, 14352, 34992, 21504, 24389, 27000, 30225, 32768, 35937, 39304, 42000, 82944, 48396, 59280, 48438, 64000, 68921, 72576, 77529, 85184, 162000, 97336
Offset: 1

Views

Author

Keywords

Comments

It appears that a(n) = n^3 for n in A088232. See also A066498. - Michel Marcus, Oct 11 2016

Crossrefs

Programs

  • Mathematica
    JJJ[4, n, lam] = Sum[If[Mod[a^3 + b^3 + c^3 + d^3, n] == Mod[lam, n], 1, 0], {d, 0, n - 1}, {a, 0, n - 1}, {b, 0, n - 1}, {c, 0 , n - 1}]; Table[JJJ[4, n, 1], {n, 1, 50}]
  • PARI
    a(n) = sum(x=1, n, sum(y=1, n, sum(z=1, n, sum(t=1, n, Mod(x,n)^3 + Mod(y,n)^3 + Mod(z,n)^3 + Mod(t,n)^3 == 1)))); \\ Michel Marcus, Oct 11 2016
    
  • PARI
    qperms(v) = {my(r=1,t); v = vecsort(v); for(i=1,#v-1, if(v[i]==v[i+1], t++, r*=binomial(i,t+1);t=0));r*=binomial(#v,t+1)}
    a(n) = {my(t=0); forvec(v=vector(4,i,[1,n]), if(sum(i=1, 4, Mod(v[i], n)^3)==1, print1(v", "); t+=qperms(v)),1);t} \\ David A. Corneth, Oct 11 2016
    
  • Python
    def A276919(n):
        ndict = {}
        for i in range(n):
            i3 = pow(i,3,n)
            for j in range(i+1):
                j3 = pow(j,3,n)
                m = (i3+j3) % n
                if m in ndict:
                    if i == j:
                        ndict[m] += 1
                    else:
                        ndict[m] += 2
                else:
                    if i == j:
                        ndict[m] = 1
                    else:
                        ndict[m] = 2
        count = 0
        for i in ndict:
            j = (1-i) % n
            if j in ndict:
                count += ndict[i]*ndict[j]
        return count # Chai Wah Wu, Jun 06 2017

A076989 Smallest cube of the form n*k + 1 with k>0.

Original entry on oeis.org

8, 27, 64, 125, 216, 343, 8, 729, 64, 1331, 1728, 2197, 27, 729, 4096, 4913, 5832, 343, 343, 9261, 64, 12167, 13824, 15625, 17576, 27, 1000, 729, 27000, 29791, 125, 35937, 39304, 42875, 1331, 2197, 1000, 343, 4096, 68921, 74088, 15625, 216, 91125, 4096
Offset: 1

Views

Author

Amarnath Murthy, Oct 25 2002

Keywords

Examples

			a(9) = 64 as 64 = 7*9 + 1.
		

Crossrefs

Programs

  • Maple
    a[1] := 8:for n from 2 to 150 do j := 2:while((j^3 mod n)<>1)do j := j+1:od: a[n] := j^3:od:seq(a[k],k=1..150);
    # Alternative
    f:=proc(n) local R;
      R:= sort([numtheory:-rootsunity(3,n)] mod n);
      if nops(R)=1 then (n+1)^3 else R[2]^3 fi
    end proc:
    map(f, [$1..150]); # Robert Israel, Mar 30 2018
  • Mathematica
    sc[n_]:=Module[{k=1},While[!IntegerQ[Surd[n*k+1,3]],k++];n*k+1]; Array[ sc,50] (* Harvey P. Dale, Mar 30 2018 *)
  • PARI
    first(n) = my(res = vector(n)); {res[1] = 8; for(i = 2, n + 1, i3 = i ^ 3-1; d = divisors(i3); j = 2; while(j <= #d && d[j] <= n, if(res[d[j]] == 0, res[d[j]] = i3 + 1); j++)); res} \\ David A. Corneth, Mar 30 2018

Formula

a(n) <= (n+1)^3. In particular, a(n) < (n+1)^3 if n is in A066498. - David A. Corneth, Mar 30 2018
a(n) = A076947(n)*n + 1. - Altug Alkan, Mar 30 2018

Extensions

More terms from Sascha Kurz, Jan 26 2003

A143973 Distances between multiples of 3 in A000010.

Original entry on oeis.org

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

Views

Author

J. Perry (johnandruth(AT)jrperry.orangehome.co.uk), Sep 06 2008

Keywords

Comments

Inspired by the question: is n == 1 mod phi(n) for n composite?

Crossrefs

Programs

Formula

a(1) = 2 since the first two numbers k such that 3 | phi(k) are 7 and 9, and 9 - 7 = 2.

Extensions

Offset corrected and more terms added by Amiram Eldar, Feb 29 2020

A343783 a(n) is the largest primorial number (A002110) which divides phi(n).

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 6, 2, 6, 2, 2, 2, 6, 6, 2, 2, 2, 6, 6, 2, 6, 2, 2, 2, 2, 6, 6, 6, 2, 2, 30, 2, 2, 2, 6, 6, 6, 6, 6, 2, 2, 6, 6, 2, 6, 2, 2, 2, 6, 2, 2, 6, 2, 6, 2, 6, 6, 2, 2, 2, 30, 30, 6, 2, 6, 2, 6, 2, 2, 6, 2, 6, 6, 6, 2, 6, 30, 6, 6, 2, 6, 2, 2, 6, 2, 6
Offset: 1

Views

Author

Amiram Eldar, Apr 29 2021

Keywords

Examples

			a(3) = 2 since phi(3) = 2 and 2 = A002110(1).
a(5) = 2 since phi(5) = 4 and 2 = A002110(1) is the largest primorial dividing 4.
a(7) = 6 since phi(7) = 6 and 6 = A002110(2).
		

Crossrefs

Programs

  • Mathematica
    prim[n_] := Times @@ Prime[Range[n]]; gp[n_] := Module[{k = 1}, While[Divisible[n, prim[k]], k++]; prim[k - 1]]; a[n_] := gp[EulerPhi[n]]; Array[a, 100]
  • PARI
    f(n) = my(s=1); forprime(p=2, , if(n%p, return(s), s *= p)); \\ A053589
    a(n) = f(eulerphi(n)); \\ Michel Marcus, May 01 2021

Formula

a(n) = A053589(A000010(n)).
Let pr(n) be the largest prime divisor of a(n) (i.e., a(n) = pr(n)# = A034386(pr(n))). Then pr(n) ~ log(log(n))/log(log(log(n))) on a set of integers of asymptotic density 1 (Pollack and Pomerance, 2020).
From Bernard Schott, May 05 2021: (Start)
a(2n) = a(n) for n>=1.
a(n) = 1 iff n = 1 or n = 2.
a(n) = 2 iff 3 does not divide phi(n) (A088232)
a(n) >= 6 iff 3 divides phi(n) (A066498). (End)

A358043 Numbers k such that phi(k) is a multiple of 8.

Original entry on oeis.org

15, 16, 17, 20, 24, 30, 32, 34, 35, 39, 40, 41, 45, 48, 51, 52, 55, 56, 60, 64, 65, 68, 70, 72, 73, 75, 78, 80, 82, 84, 85, 87, 88, 89, 90, 91, 95, 96, 97, 100, 102, 104, 105, 110, 111, 112, 113, 115, 116, 117, 119, 120, 123, 128, 130, 132, 135, 136, 137, 140, 143
Offset: 1

Views

Author

Darío Clavijo, Oct 26 2022

Keywords

Crossrefs

Cf. A000010 (phi), A053574 (its 2-adic valuation), A037074 (a subsequence).
Totient multiples: A066498 (3), A172019 (4), A066500 (5), A066502 (7), A332512 (12).

Programs

  • Mathematica
    Select[Range[150], Divisible[EulerPhi[#], 8] &] (* Amiram Eldar, Oct 27 2022 *)
  • PARI
    isok(k) = Mod(eulerphi(k), 8) == 0; \\ Michel Marcus, Oct 27 2022
  • Python
    from sympy.ntheory import totient
    def isok(n): return totient(n) % 8 == 0
    

Formula

A000010(a(n)) == 0 (mod 8).
Previous Showing 11-15 of 15 results.