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 10 results.

A002380 a(n) = 3^n reduced modulo 2^n.

Original entry on oeis.org

0, 1, 1, 3, 1, 19, 25, 11, 161, 227, 681, 1019, 3057, 5075, 15225, 29291, 55105, 34243, 233801, 439259, 269201, 1856179, 3471385, 6219851, 1882337, 5647011, 50495465, 17268667, 186023729, 21200275, 63600825, 1264544299, 3793632897, 7085931395
Offset: 0

Views

Author

Keywords

Comments

A065554 lists the indices n such that a(n+1) = 3*a(n). - Benoit Cloitre, Apr 21 2003
a(n) = (fractional part of (3/2)^n without the decimal point)/5^n = A204544(n) / 5^n. - Michel Lagneau, Jan 25 2012

References

  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 82.
  • S. S. Pillai, On Waring's problem, J. Indian Math. Soc., 2 (1936), 16-44.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. k^n mod (k-1)^n: this sequence (k=3), A064629 (k=4), A138589 (k=5), A138649 (k=6), A139786 (k=7), A138973 (k=8), A139733 (k=9).

Programs

  • Haskell
    a002380 n = 3^n `mod` 2^n  -- Reinhard Zumkeller, Jul 11 2014
  • Maple
    a:=n->3^n mod(2^n): seq(a(n), n=0..33); # Zerinvary Lajos, Feb 15 2008
  • Mathematica
    Table[ PowerMod[3, n, 2^n], {n, 0, 33}] (* Robert G. Wilson v, Dec 14 2006 *)
    Table[ 3^n - 2^n * Floor[ (3/2)^n ], {n,0,33} ] (* Fred Daniel Kline, Oct 12 2017 *)
    x[n_] := -(1/2) + (3/2)^n + ArcTan[Cot[(3/2)^n Pi]]/Pi;
    y[n_] := 3^n - 2^n * x[n];
    Array[y, 33] (* Fred Daniel Kline, Dec 21 2017 *)
  • PARI
    concat([0],vector(55,n,lift(Mod(3,2^n)^n))) \\ Joerg Arndt, Oct 14 2017
    

Extensions

More terms from Jason Earls, Jul 29 2001

A138589 a(n) = 5^n mod 4^n.

Original entry on oeis.org

0, 1, 9, 61, 113, 53, 3337, 12589, 62945, 118117, 328441, 2690781, 9259601, 12743573, 197935593, 452807053, 2264035265, 7025209029, 35126045145, 106910748989, 809431651889, 1848135003893, 9240675019465, 28611189052909, 213424689442209, 785648470500389
Offset: 0

Views

Author

N. J. A. Sloane, May 20 2008

Keywords

Crossrefs

Cf. k^n mod (k-1)^n: A002380 (k=3), A064629 (k=4), this sequence (k=5), A138649 (k=6), A139786 (k=7), A138973 (k=8), A139733 (k=9).

Programs

  • Mathematica
    Table[PowerMod[5, n, 4^n], {n,0,50}] (* G. C. Greubel, Oct 01 2017 *)
  • PARI
    concat([0], vector(50, n, lift(Mod(5, 4^n)^n))) \\ Michel Marcus, Oct 02 2017

A138649 a(n) = 6^n mod 5^n.

Original entry on oeis.org

0, 1, 11, 91, 46, 1526, 15406, 45561, 117116, 312071, 1872426, 21000181, 223657336, 853662766, 5121976596, 12421312701, 74527876206, 141991475986, 2377827762166, 18081663838621, 32196037719226, 2441363034106, 491485336407761, 2948912018446566
Offset: 0

Views

Author

N. J. A. Sloane, May 20 2008

Keywords

Crossrefs

Cf. k^n mod (k-1)^n: A002380 (k=3), A064629 (k=4), A138589 (k=5), this sequence (k=6), A139786 (k=7), A138973 (k=8), A139733 (k=9).

Programs

  • Mathematica
    Table[PowerMod[6,n,5^n],{n,0,30}] (* Harvey P. Dale, Jan 23 2014 *)

A138973 a(n) = 8^n mod 7^n.

Original entry on oeis.org

0, 1, 15, 169, 1695, 15961, 26846, 450066, 5247614, 13156907, 226316077, 680627620, 13354327932, 65310761853, 328708074010, 1951441519231, 15611532153848, 158125187800385, 101848932467045, 7328445851378156, 35829776440278962, 286638211522231696
Offset: 0

Views

Author

N. J. A. Sloane, May 20 2008

Keywords

Crossrefs

Cf. k^n mod (k-1)^n: A002380 (k=3), A064629 (k=4), A138589 (k=5), A138649 (k=6), A139786 (k=7), this sequence (k=8), A139733 (k=9).

Programs

  • Mathematica
    a[n_]:=PowerMod[8,n,7^n];Array[a,22,0] (* James C. McMahon, Jun 23 2025 *)
  • PARI
    a(n) = lift(Mod(8, 7^n)^n); \\ Michel Marcus, Feb 20 2018
  • Sage
    [power_mod(8,n,7^n) for n in range(0,22)] # Zerinvary Lajos, Nov 28 2009
    

A139786 a(n) = 7^n mod 6^n.

Original entry on oeis.org

0, 1, 13, 127, 1105, 1255, 24337, 263671, 725953, 42823, 40610545, 163341463, 780593185, 5464152295, 51309760081, 45711664183, 2200721587585, 12583941205639, 3454291215793, 430419865184215, 3012939056289505, 10122098073837607, 92791637157241105, 517919756258420599
Offset: 0

Views

Author

N. J. A. Sloane, May 20 2008

Keywords

Crossrefs

Cf. k^n mod (k-1)^n: A002380 (k=3), A064629 (k=4), A138589 (k=5), A138649 (k=6), this sequence (k=7), A138973 (k=8), A139733 (k=9).

A064630 Number of parts if 4^n is partitioned into parts of size 3^n as far as possible into parts of size 2^n as far as possible and into parts of size 1^n.

Original entry on oeis.org

2, 5, 5, 16, 25, 15, 66, 121, 146, 771, 1220, 3641, 8093, 15843, 28359, 50236, 33366, 36709, 145250, 137776, 548024, 2186496, 1066102, 4251976, 16984368, 28678103, 13620614, 205950171, 100716646, 381399635, 1397934923, 3826001641
Offset: 1

Views

Author

Labos Elemer, Oct 01 2001

Keywords

Comments

Corresponds to the only solution of the Diophantine equation 4^n = x*3^n + y*2^n + z*1^n with constraints 0 <= y < 3^n/2^n, 0 <= z < 2^n.
Binary order (cf. A029837) of a(n) is close to n.

Examples

			4^6 = 4096 = 729 + 729 + 729 + 729 + 729 + 64 + 64 + 64 + 64 + 64 + 64 + 64 + 1 + 1 + 1 = 5*3^6 + 7*2^6 + 3*1^6, so a(6) = 5 + 7 + 3 = 15.
		

Crossrefs

Programs

  • PARI
    {for(n=1,32,a=divrem(4^n,3^n); b=divrem(a[2],2^n); print1(a[1]+b[1]+b[2],","))}
    
  • PARI
    { f=t=w=1; for (n=1, 250, f*=4; t*=3; w*=2; a=divrem(f, t); b=divrem(a[2], w); write("b064630.txt", n, " ", a[1]+b[1]+b[2]) ) } \\ Harry J. Smith, Sep 20 2009

Formula

a(n) = A064628(n) + floor(A064629(n)/2^n) + (A064629(n) mod 2^n) = floor(4^n/3^n) + floor((4^n mod 3^n)/2^n) + ((4^n mod 3^n) mod 2^n)

Extensions

Edited by Klaus Brockhaus, May 24 2003

A264921 Decimal expansion of constant z = Sum_{n>=1} {(4/3)^n} * (3/4)^n, where {x} is the fractional part of x.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Dec 03 2015

Keywords

Examples

			z = 1.3674613793533292690213005282375408043459455128489\
95308372047811256740468021073868363924717667719851\
06657126382091430093262809389877022961101682172499\
02238259341816554595008536419105724432961711520592\
92511101423029805093364719414748469451590148076361\
52981353989027739504422481304813339179550172220838\
78986350689080620566812697277477621308107983782819\
76274774500215875970544025343446657398435575812229\
28979675592867430344641751297842513480112243120370\
37616509374801184872891959991759744341259271254468...
INFINITE SERIES.
z = 1/4 + 7/4^2 + 10/4^3 + 13/4^4 + 52/4^5 + 451/4^6 + 1075/4^7 + 6487/4^8 + 6265/4^9 + 44743/4^10 + 119923/4^11 + 302545/4^12 + 147298/4^13 + 589192/4^14 + 11922706/4^15 + 33341917/4^16 + 4227505/4^17 + 146050183/4^18 + 584200732/4^19 + 1174541461/4^20 +...+ A064629(n)/4^n +...
		

Crossrefs

Cf. A064629 (4^n mod 3^n), A264918, A264919, A264920, A264922.

Formula

z = Sum_{n>=1} (4^n mod 3^n) / 4^n = Sum_{n>=1} A064629(n) / 4^n.

A064631 a(n) = ceiling(log_2(A064630(n))).

Original entry on oeis.org

2, 3, 3, 5, 5, 4, 7, 7, 8, 10, 11, 12, 13, 14, 15, 16, 16, 16, 18, 18, 20, 22, 21, 23, 25, 25, 24, 28, 27, 29, 31, 32, 33, 34, 35, 36, 37, 37, 39, 40, 39, 42, 42, 44, 44, 46, 46, 46, 49, 50, 51, 51, 51, 54, 55, 55, 57, 57, 59, 60, 60, 61, 63, 64, 64, 66, 60, 62, 67, 70, 69, 72
Offset: 1

Views

Author

Labos Elemer, Oct 01 2001

Keywords

Comments

In A064630, using a greedy algorithm we write 4^n = x*3^n+y*2^n+z*1^n and A064630(n) = x+y+z. This sequence is a measure of the "length" or complexity of those solutions.

Crossrefs

Formula

a(n) = A029837(A064630(n)) = ceiling(log_2(A064630(n))).

Extensions

Initial terms corrected and entry revised by Sean A. Irvine, Jul 18 2023

A245805 a(n) = 12^n mod 11^n.

Original entry on oeis.org

0, 1, 23, 397, 6095, 87781, 1214423, 16344637, 1263934, 443884970, 10042515022, 172385029466, 2639243694814, 3425068947279, 144668963799141, 2875277066339415, 1085339440747772, 196822992743261908, 4383664026916317980, 13684547128550195393, 470010017784675076171
Offset: 0

Views

Author

Vincenzo Librandi, Aug 04 2014

Keywords

Crossrefs

Cf. k^n mod (k-1)^n: A002380 (k=3), A064629 (k=4), A138589 (k=5), A138649 (k=6), A139786 (k=7), A138973 (k=8), A139733 (k=9), A016189 (k=10), A016195 (k=11), this sequence (k=12),

Programs

  • Magma
    [12^n mod 11^n: n in [0..25]];
    
  • Mathematica
    Table[PowerMod[12, n, 11^n], {n, 0, 30}]
  • PARI
    vector(50, n, 12^(n-1)%11^(n-1)) \\ Derek Orr, Aug 04 2014

A178998 Primes of the form 4^k mod 3^k.

Original entry on oeis.org

7, 13, 119923, 146050183, 4039362385345521139, 289247481259011497824466400997481269, 1765256712749403700417549596608786383, 395766070055468241613007225643003404495980782673, 2596786183076854435238229837938226284218037897451862682304077097493117
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 03 2011

Keywords

Crossrefs

Programs

  • Maple
    select(isprime, [4&^n mod 3^n$n=1..200])[];  # Alois P. Heinz, May 18 2019
  • Mathematica
    Select[Table[PowerMod[4, n, 3^n], {n, 100}], PrimeQ] (* Alonso del Arte, Jan 03 2011 *)
  • PARI
    terms(n) = my(i=0); for(k=0, oo, if(i>=n, break); my(x=lift(Mod(4, 3^k)^k)); if(ispseudoprime(x), print1(x, ", "); i++))
    /* Print initial 7 terms as follows: */
    terms(7) \\ Felix Fröhlich, May 18 2019

Formula

{ A000040 } intersect { A064629 }.
Showing 1-10 of 10 results.