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-10 of 12 results. Next

A182140 Numbers n such that A060968(n) = A201629(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 15, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 255, 257
Offset: 1

Views

Author

Keywords

Comments

Includes prime numbers and the sequence A071700.
a(n) = A240960(n) for n <= 35. - Reinhard Zumkeller, Aug 05 2014

Crossrefs

Programs

  • Haskell
    a182140 n = a182140_list !! (n-1)
    a182140_list = [x | x <- [1..], a060968 x == a201629 x]
    -- Reinhard Zumkeller, Aug 05 2014
  • Mathematica
    fa = FactorInteger; A060968[p_, s_] := Which[Mod[p, 4] == 1, p^( s - 1)*(p - 1), Mod[p, 4] == 3, p^(s - 1)*(p + 1), s == 1,2, True, 2^(s + 1)]; A060968[1] = 1; A060968[n_] := Product[A060968[fa[n][[i, 1]], fa[n][[i, 2]]], {i, Length[fa[n]]}]; A201629[n_] := Which[Mod[n, 4] == 1, (n - 1), Mod[n, 4] == 3, (n + 1), True, n]; Select[Range[1000], A060968[#] == A201629[#] &]
  • PARI
    is(n)=my(f=factor(n)[, 1]); n*prod(i=if(n%2, 1, 2), #f, if(f[i]%4==1, 1-1/f[i], 1+1/f[i]))*if(n%4, 1, 2)==if(n%2,(n+1)\4*4,n) \\ Charles R Greathouse IV, Jul 03 2013
    

A212502 Composite numbers k that divide the imaginary part of (1+2i)^A201629(k).

Original entry on oeis.org

4, 8, 12, 16, 24, 32, 36, 48, 56, 64, 72, 96, 108, 112, 128, 132, 143, 144, 156, 168, 192, 216, 224, 256, 264, 272, 288, 312, 324, 336, 384, 392, 396, 399, 432, 448, 468, 496, 504, 512, 527, 528, 544, 552, 576, 624, 648, 672, 768, 779, 784, 792, 816, 864
Offset: 1

Views

Author

Keywords

Comments

If p is a prime number then p divides the imaginary part of (1+2i)^A201629(p).
The numbers of this sequence may be called Fermat pseudoprimes to base 1+2i.

Crossrefs

Programs

  • Maple
    A201629:= proc(n) if n::even then n elif n mod 4 = 1 then n-1 else n+1 fi end proc:
    filter:= proc(n) not isprime(n) and type(Powmod(1+2*x, A201629(n), x^2+1, x) mod n, integer) end proc:
    select(filter, [$2..1000]); # Robert Israel, Nov 06 2019
  • Mathematica
    A201629[n_]:=Which[Mod[n,4]==3,n+1,Mod[n,4]==1,n-1,True,n]; Select[1+ Range[1000], ! PrimeQ[#] && Im[PowerMod[1 + 2I, A201629[#], #]] == 0 &]

Extensions

Definition revised by José María Grau Ribas, Oct 12 2013

A213337 Odd composite numbers k that divide the imaginary part of (1+2i)^A201629(k).

Original entry on oeis.org

143, 399, 527, 779, 1501, 1679, 2407, 2627, 2703, 2737, 3239, 3289, 3599, 3827, 4031, 4033, 4879, 4991, 5183, 5291, 5719, 5921, 6479, 6601, 6721, 7739, 8321, 8687, 8903, 9361, 9503, 10153, 10439, 11537, 11663
Offset: 1

Views

Author

Keywords

Comments

The odd terms of A212502.

Crossrefs

Programs

  • Mathematica
    t[n_]:=Which[Mod[n,4]==3,n+1,Mod[n,4]==1,n-1,True,n]; Select[1+ Range[1000], Mod[#,2]==1&&! PrimeQ[#] && Im[PowerMod[1 + 2I, t[#], #]] == 0 &]

A235864 G-Lehmer numbers: Composite numbers k such that A060968(k) divides A201629(k).

Original entry on oeis.org

15, 143, 255, 385, 3599, 5183, 11663, 32399, 34561, 36863, 51983, 57599, 65535, 97343, 121103, 147455, 176399, 186623, 195841, 359999, 435599, 685583, 1034881, 1040399, 1065023, 1192463, 1327103, 1742399, 2039183, 2108303, 2214143, 2585663, 2624399, 2782223, 3196943
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    fa=FactorInteger; phi[p_, s_] := Which[Mod[p, 4] == 1, p^(s-1)*(p-1), Mod[p, 4]==3, p^(s-1)*(p+1), s==1, 2, True, 2^(s+1)]; phi[1]=1; phi[n_] := Product[phi[fa[n][[i, 1]], fa[n][[i, 2]]], {i, Length[fa[n]]}]; Select[Range[1000], IntegerQ[FU[#]/phi[#]] && PrimeQ[#] == False &]

Extensions

a(29)-a(35) from Amiram Eldar, Nov 24 2023

A235865 G-Carmichael numbers: Composite number such that A235863(n) divides A201629(n).

Original entry on oeis.org

4, 8, 12, 15, 16, 20, 24, 32, 36, 40, 48, 56, 60, 64, 72, 80, 96, 100, 105, 108, 112, 120, 128, 132, 143, 144, 156, 160, 168, 180, 192, 200, 216, 224, 240, 255, 256, 264, 272, 280, 288, 300, 312, 320, 324, 336, 360, 380, 384, 385, 392, 396, 399, 400, 432
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    FU[n_] := Which[Mod[n, 4] == 3, n + 1, Mod[n, 4] == 1, n - 1, True, n]; fa = FactorInteger; lam[1] = 1; lam[p_,s_] := Which[Mod[p, 4] == 3, p^(s - 1) (p + 1), Mod[p, 4] == 1, p^(s - 1) (p - 1), s ≥ 5, 2^(s -2), s > 1, 4, s == 1, 2]; lam[n_] := {aux = 1; Do[aux = LCM[aux, lam[fa[n][[i, 1]], fa[n][[i, 2]]]], {i, 1, Length[fa[n]]}]; aux}[[1]];Select[1+Range[1000], ! PrimeQ[#] && IntegerQ[FU[#]/lam[#]] &]
  • PARI
    ok(n)={my(f=factor(n), r=n-kronecker( -4, n)); for(i=1, #f~, my([p, e]=f[i, ]); my(t=if(p==2, 2^max(e-2, min(e, 2)), p^(e-1)*if(p%4==1, p-1, p+1))); if(r%t, return(0)) ); n>1 && !isprime(n)} \\ Andrew Howroyd, Aug 06 2018

Extensions

a(55) corrected by Andrew Howroyd, Aug 06 2018

A235863 Exponent of the multiplicative group G_n:={x+iy: x^2+y^2==1 (mod n); 0 <= x,y < n} where i=sqrt(-1).

Original entry on oeis.org

1, 2, 4, 4, 4, 4, 8, 4, 12, 4, 12, 4, 12, 8, 4, 4, 16, 12, 20, 4, 8, 12, 24, 4, 20, 12, 36, 8, 28, 4, 32, 8, 12, 16, 8, 12, 36, 20, 12, 4, 40, 8, 44, 12, 12, 24, 48, 4, 56, 20, 16, 12, 52, 36, 12, 8, 20, 28, 60, 4, 60, 32, 24, 16, 12, 12, 68, 16, 24, 8, 72
Offset: 1

Views

Author

Keywords

Comments

From Jianing Song, Nov 05 2019: (Start)
Exponent of the group G is the least e > 0 such that x^e = 1 for every x in G, where 1 is the identity element.
Also the exponent of O(2,Z_n) or SO(2,Z_n). O(2,Z_n) is the group of 2 X 2 matrices A over Z_n such that A*A^T = E = [1,0;0,1]; SO(2,Z_n) is the group of 2 X 2 matrices A over Z_n such that A*A^T = E = [1,0;0,1] and det(A) = 1. Note that G_n is isomorphic to SO(2,Z_n) by the mapping x+yi <-> [x,y;-y,x]. See A060698 for the group structure of SO(2,Z_n) and A182039 for the group structure of O(2,Z_n). (End)

Crossrefs

(Z/nZ)* ------ G_n
Order: A000010 ------ A060968.
Exponent: A002322 ------ this sequence.
n-1 ------ A201629.
Carmichael/G-Carmichael numbers: A002997 ------ A235865.
Lehmer /G-Lehmer numbers: unknown ------ A235864.
Cyclic/G-cyclic numbers: A003277 ------ A235866.
n such that the group is cyclic: A033948 ------ A235868.

Programs

  • Mathematica
    fa=FactorInteger; lam[1]=1;lam[p_, s_] := Which[Mod[p, 4] == 3, p ^ (s - 1 ) (p + 1) , Mod[p, 4] == 1, p ^ (s - 1 ) (p - 1)  , s ≥ 5, 2 ^ (s - 2 ), s > 1, 4, s == 1, 2];lam[n_] := {aux = 1; Do[aux = LCM[aux, lam[fa[n][[i, 1]], fa[n][[i, 2]]]], {i, 1, Length[fa[n]]}]; aux}[[1]] ; Array[lam, 100]
  • PARI
    a(n)={my(f=factor(n)); lcm(vector(#f~, i, my([p,e]=f[i,]); if(p==2, 2^max(e-2, min(e,2)), p^(e-1)*if(p%4==1, p-1, p+1))))} \\ Andrew Howroyd, Aug 06 2018

Formula

a(2) = 2, a(4) = a(8) = a(16) = 4, a(2^e) = 2^(e-2) for e >= 5; a(p^e) = (p-1)*p^(e-1) if p == 1 (mod 4) and (p+1)*p^(e-1) if p == 1 (mod 4). - Jianing Song, Nov 05 2019
If gcd(n,m)=1 then a(nm) = lcm(a(n), a(m)).

A212831 a(4*n) = 2*n, a(2*n+1) = 2*n+1, a(4*n+2) = 2*n+2.

Original entry on oeis.org

0, 1, 2, 3, 2, 5, 4, 7, 4, 9, 6, 11, 6, 13, 8, 15, 8, 17, 10, 19, 10, 21, 12, 23, 12, 25, 14, 27, 14, 29, 16, 31, 16, 33, 18, 35, 18, 37, 20, 39, 20, 41, 22, 43, 22, 45, 24, 47, 24, 49, 26, 51, 26, 53, 28, 55, 28, 57, 30, 59, 30, 61, 32, 63, 32, 65, 34, 67, 34, 69, 36, 71, 36, 73, 38, 75
Offset: 0

Views

Author

Paul Curtz, Aug 14 2012

Keywords

Comments

First differences: (1, 1, 1, -1, 3, -1, 3, -3, 5,...) = (1, A186422).
Second differences: (0, 0, -2, 4, -4, 4, -6, 8, ...) = (-1)^(n+1) * A201629(n).
Interleave the terms with even indices of the companion A215495 and this one to get (A215495(0), A212831(0), A215495(2), A212831(2),...) = (1, 0, 1, 2, 3, 2, 3, 4, 5, 4,...) = A106249, up to the initial term = A083219 = A083220/2.

Crossrefs

Programs

  • Magma
    [(1/4)*((1 +(-1)^n)*(1 - (-1)^Floor(n/2)) + (3 -(-1)^n)*n): n in [0..50]]; // G. C. Greubel, Apr 25 2018
  • Mathematica
    a[n_] := (1/4)*((-(1 + (-1)^n))*(-1 + (-1)^Floor[n/2]) - (-3 + (-1)^n)*n ); Table[a[n], {n, 0, 84}] (* Jean-François Alcover, Sep 18 2012 *)
    LinearRecurrence[{0,1,0,1,0,-1},{0,1,2,3,2,5},80] (* Harvey P. Dale, May 29 2016 *)
  • PARI
    A212831(n)=if(bittest(n,0), n, n\2+bittest(n,1)) \\ M. F. Hasler, Oct 21 2012
    
  • PARI
    for(n=0,50, print1((1/4)*((1 +(-1)^n)*(1 - (-1)^floor(n/2)) + (3 -(-1)^n)*n), ", ")) \\ G. C. Greubel, Apr 25 2018
    

Formula

a(n) + A215495(n) = A043547(n).
a(n) = -A214283(n)/A000108([n/2]).
a(n+1) = (A186421(n)=0,1,2,1,4,...) + 1.
a(2*n) = A052928(n+1).
a(n+2) - a(n) = 2, 2, 0, 2. (period 4).
a(n) = a(n-2) +a(n-4) -a(n-6); also holds for A215495(n).
G.f.: x*(1+2*x+2*x^2+x^4) / ( (x^2+1)*(x-1)^2*(1+x)^2 ). - R. J. Mathar, Aug 21 2012
a(n) = (1/4)*((1 +(-1)^n)*(1 - (-1)^floor(n/2)) + (3 -(-1)^n)*n). - G. C. Greubel, Apr 25 2018

Extensions

Corrected and edited by M. F. Hasler, Oct 21 2012

A212601 Intersection of A001567 and A212502.

Original entry on oeis.org

4033, 6601, 8321, 15841, 25761, 29341, 41041, 46657, 75361, 115921, 162401, 172081, 252601, 294409, 314821, 332949, 401401, 410041, 488881, 530881, 552721, 642001, 721801, 873181, 934021, 1004653, 1207361, 1461241, 1876393, 1909001, 2081713, 2085301, 2113921
Offset: 1

Views

Author

Keywords

Comments

Only 1 (mod 4) numbers have been found.

Crossrefs

Cf. A201629.
Cf. A001567 (pseudoprimes to base 2).
Cf. A212502 (pseudoprimes to base 1+2i).

Programs

  • Mathematica
    t[n_] := Which[Mod[n, 4] == 3, n + 1, Mod[n, 4] == 1, n - 1,  True,  n]; Select[1 + Range[99000], PowerMod[2, # - 1, #] == 1 && !PrimeQ[#] && Im[PowerMod[1 + 2I, t[#], #]] == 0 &]

A182221 Composite numbers in A182140 but not in A071700.

Original entry on oeis.org

255, 385, 34561, 65535, 147455, 195841, 1034881, 4070401, 4746241, 5040001, 16675201, 22704001, 36067201, 47013121, 83623935, 136967041, 168720001, 271878145, 549141119, 613092481, 836567041, 1039779841, 1049759999, 1548072961, 2556902401, 2646067201
Offset: 1

Views

Author

Keywords

Comments

A182140 includes the prime numbers and A071700.

Crossrefs

Programs

  • Mathematica
    fa=FactorInteger;isA071700[n_]:=Length@fa[n]==2&&fa[n][[1,2]]==fa[n][[2,2]]==1&&Mod[Sqrt[n+1],4]==0; A060968[p_, s_] := Which[Mod[p, 4] == 1, p^(s-1)*(p-1), Mod[p, 4]==3, p^(s-1)*(p+1), s==1, 2, True, 2^(s+1)]; A060968[1]=1; A060968[n_] := Product[A060968[fa[n][[i, 1]], fa[n][[i, 2]]], {i, Length[fa[n]]}]; A201629[n_]:=Which[Mod[n, 4]==1, (n-1), Mod[n, 4]==3, (n+1), True, n];
    Select[Range[10000], !isA071700[#]&&!PrimeQ[#]&&A060968[#]==A201629[#]&]
  • PARI
    isA071700(n)=my(k=sqrtint(n\16)); n==16*k^2+32*k+15 && isprime(4*k+3) && isprime(4*k+5)
    is(n)=if(isprime(n),return(0)); my(f=factor(n)[, 1]); n*prod(i=if(n%2, 1, 2), #f, if(f[i]%4==1, 1-1/f[i], 1+1/f[i]))*if(n%4, 1, 2)==if(n%2,(n+1)\4*4,n) && !isA071700(n) \\ Charles R Greathouse IV, Jul 03 2013

Extensions

a(15)-a(23) from Charles R Greathouse IV, Jul 03 2013
a(24)-a(26) from Charles R Greathouse IV, Jul 05 2013

A185342 Triangle of successive recurrences in columns of A117317(n).

Original entry on oeis.org

2, 4, -4, 6, -12, 8, 8, -24, 32, -16, 10, -40, 80, -80, 32, 12, -60, 160, -240, 192, -64, 14, -84, 280, -560, 672, -448, 128, 16, -112, 448, -1120, 1792, -1792, 1024, -256, 18, -144, 672, -2016, 4032, -5376, 4608, -2304, 512, 20, -180, 960, -3360, 8064
Offset: 0

Views

Author

Paul Curtz, Jan 26 2012

Keywords

Comments

A117317 (A):
1
2 1
4 5 1
8 16 9 1
16 44 41 14 1
32 112 146 85 20 1
64 272 456 377 155 27 1
have for their columns successive signatures
(2) (4,-4) (6,-12,8) (8,-24, 32, -16) (10,-40,80,-80,32) i.e. a(n).
Take based on abs(A133156) (B):
1
2 0
4 1 0
8 4 0 0
16 12 1 0 0
32 32 6 0 0 0
64 80 24 1 0 0 0.
The recurrences of successive columns are also a(n). a(n) columns: A005843(n+1), A046092(n+1), A130809, A130810, A130811, A130812, A130813.

Examples

			Triangle T(n,k),for 1<=k<=n, begins :
2                                         (1)
4    -4                                   (2)
6   -12   8                               (3)
8   -24  32   -16                         (4)
10  -40  80   -80   32                    (5)
12  -60 160  -240  192   -64              (6)
14  -84 280  -560  672  -448  128         (7)
16 -112 448 -1120 1792 -1792 1024 -256    (8)
Successive rows can be divided by A171977.
		

Crossrefs

Cf. For (A): A053220, A056243. For (B): A000079, A001787, A001788, A001789. For A193862: A115068 (a Coxeter group). For (2): A014480 (also (3),(4),(5),..); also A053220 and A001787.
Cf. A007318.

Programs

  • Mathematica
    Table[(-1)*Binomial[n, k]*(-2)^k, {n, 1, 20}, {k, 1, n}] // Flatten (* G. C. Greubel, Jun 27 2017 *)
  • PARI
    for(n=1,20, for(k=1,n, print1((-2)^(k+1)*binomial(n,k)/2, ", "))) \\ G. C. Greubel, Jun 27 2017

Formula

Take A133156(n) without 1's or -1's double triangle (C)=
2
4
8 -4
16 -12
32 -32 6
64 -80 24
128 -192 80 -8
256 -448 240 -40
512 -1024 672 -160 10;
a(n) is increasing odd diagonals and increasing (sign changed) even diagonals. Rows sum of (C) = A201629 (?) Another link between Chebyshev polynomials and cos( ).
Absolute values: A013609(n) without 1's. Also 2*A193862 = (2*A002260)*A135278.
T(n,k) = T(n-1,k) - 2*T(n-1,k-1) for k>1, T(n,1) = 2*n = 2*T(n-1,1) - T(n-2,1). - Philippe Deléham, Feb 11 2012
T(n,k) = (-1)* Binomial(n,k)*(-2)^k, 1<=k<=n. - Philippe Deléham, Feb 11 2012
Showing 1-10 of 12 results. Next