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 51-60 of 64 results. Next

A294390 a(n) = 2^(n-4) mod n, for n >= 4.

Original entry on oeis.org

1, 2, 4, 1, 0, 5, 4, 7, 4, 5, 2, 8, 0, 15, 4, 12, 16, 11, 14, 3, 16, 2, 10, 5, 8, 11, 4, 4, 0, 17, 30, 23, 4, 14, 24, 20, 16, 36, 4, 27, 12, 32, 6, 6, 16, 8, 14, 26, 40, 20, 22, 13, 16, 29, 22, 37, 16, 23, 8, 32, 0, 2, 4, 42, 52, 35, 64, 9, 40, 64, 28, 23, 20, 30, 4
Offset: 4

Views

Author

Enrique Navarrete, Oct 29 2017

Keywords

Comments

Every nonnegative integer seems to appear in the sequence, and every integer seems to appear in the sequence of first differences (see link).
From Robert Israel, Dec 04 2017: (Start)
a(n) = 0 iff n>=8 is a power of 2.
a(n) = 1 iff n=4 or n is in A033984.
a(n) = 2 iff n>=4 is in A015925 and is not divisible by 4. (End)

Examples

			For n=9, 2^5 = 32 == 5 mod 9.
		

Crossrefs

Programs

Extensions

More terms from Michel Marcus, Oct 30 2017

A357531 Final value obtained by traveling clockwise around a circular array with positions numbered clockwise from 1 to n. Each move consists of traveling clockwise k places, where k is the position at the beginning of the move. The first move begins at position 1. a(n) is the position at the end of the n-th move.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 8, 8, 4, 2, 4, 2, 4, 8, 16, 2, 10, 2, 16, 8, 4, 2, 16, 7, 4, 26, 16, 2, 4, 2, 32, 8, 4, 18, 28, 2, 4, 8, 16, 2, 22, 2, 16, 17, 4, 2, 16, 30, 24, 8, 16, 2, 28, 43, 32, 8, 4, 2, 16, 2, 4, 8, 64, 32, 64, 2, 16, 8, 44, 2, 64, 2, 4, 68, 16, 18, 64, 2, 16, 80, 4, 2, 64, 32, 4, 8, 80
Offset: 1

Views

Author

Moosa Nasir, Nov 19 2022

Keywords

Comments

This is only an empirical observation, but when we graph this sequence, a point always exists at the intersection of y = 2^b and y = -x + 2^(b+1), where b is any integer greater than or equal to 1. This means that a(2^b) = 2^b. This is shown in a link.
Many of the terms seem to be of the form 2^b.

Examples

			For n = 5, with a circular array of positions numbered clockwise from 1 to 5, start at position 1.
On move 1, travel 1 unit clockwise, reaching position 2.
On move 2, travel 2 units clockwise, reaching position 4.
On move 3, travel 4 units clockwise (almost a full circle), reaching position 3.
On move 4, travel 3 units clockwise, reaching position 1.
On move 5, travel 1 unit clockwise, reaching position 2.
Since the final position at the end of the 5th move is 2, a(5) = 2. (See the illustration in the links.)
		

Crossrefs

Cf. A358647 (stepping in digits of n).
Equals {A082495} + 1. - Hugo Pfoertner, Nov 30 2022

Programs

  • C
    int a(int n)
    {
        int current = 1;
        for (int j = 0; j < n; j++) {
            current += current;
            if (current > n) {
                current = current - n;
            }
        }
        return current;
    }
    
  • PARI
    a(n) = lift(Mod(2,n)^n - 1) + 1; \\ Kevin Ryde, Nov 20 2022
    
  • Python
    def A357531(n): return m if (m:=pow(2,n,n)) else n # Chai Wah Wu, Dec 01 2022

Formula

a(n) = ((2^n - 1) mod n) + 1 = A082495(n) + 1. - Jon E. Schoenfield, Nov 20 2022

A065891 The a(n)-th composite number is 2^n.

Original entry on oeis.org

1, 3, 9, 20, 45, 96, 201, 414, 851, 1738, 3531, 7163, 14483, 29255, 58993, 118820, 239143, 480897, 966550, 1941540, 3898356, 7824444, 15699344, 31490742, 63151054, 126614174, 253804612, 508678161, 1019341795, 2042386082, 4091687074, 8196318785, 16416930072
Offset: 2

Views

Author

Labos Elemer, Nov 28 2001

Keywords

Comments

Index of n-th power of 2 in A002808.
Remainder of division 2^n/c(n) equals zero, where c(n) = A002808(n), the n-th composite number.
Exponential increase with a factor > 2 and approaching two.

Examples

			For n = 4, 2^4 = 16 is the 9th composite number: 4,6,8,9,10,12,14,15,16, so a(4) = 9.
		

Crossrefs

Programs

  • Maple
    seq(2^k - numtheory:-pi(2^k)-1, k=2..28); # Robert Israel, Dec 10 2024
  • Mathematica
    Do[s=Mod[2^n, c[n]]; If[s==0, Print[n]], {n, 2, 1000000}]
    Table[2^n-(PrimePi[2^n])-1, {n, 2, 31}]
  • PARI
    lista(kmax) = {my(c = 0); forcomposite(k = 1, kmax, c++; if(k >> valuation(k, 2) == 1, print1(c, ", ")));} \\ Amiram Eldar, Jun 04 2024

Formula

a(n) = 2^n - A065855(2^n) - 1. - Robert Israel, Dec 10 2024

Extensions

Edited by Robert G. Wilson v, Jun 18 2002
a(32)-a(34) from Amiram Eldar, Jun 04 2024

A073816 a(n) = 2^sigma(n) mod n.

Original entry on oeis.org

0, 0, 1, 0, 4, 4, 4, 0, 2, 4, 4, 4, 4, 8, 1, 0, 4, 8, 4, 4, 4, 20, 4, 16, 23, 12, 16, 4, 4, 16, 4, 0, 25, 30, 1, 20, 4, 26, 22, 24, 4, 22, 4, 16, 19, 18, 4, 16, 36, 42, 1, 4, 4, 46, 26, 8, 28, 6, 4, 16, 4, 2, 4, 0, 1, 16, 4, 64, 49, 36, 4, 8, 4, 64, 16, 44, 64, 40, 4, 64, 11, 64, 4, 4, 16
Offset: 1

Views

Author

Labos Elemer, Aug 16 2002

Keywords

Examples

			n=17: sigma(17) = 18, 2^18 = 262144, 262144 mod 17 = 4 = a(17).
		

Crossrefs

Programs

  • Mathematica
    Table[PowerMod[2,DivisorSigma[1,n],n],{n,90}] (* Harvey P. Dale, Jun 23 2014 *)

A096385 a(n) = smallest prime p with p^n mod n = 1.

Original entry on oeis.org

3, 7, 3, 11, 5, 29, 3, 7, 11, 23, 5, 53, 13, 31, 3, 103, 5, 191, 3, 37, 23, 47, 5, 11, 53, 7, 13, 59, 11, 311, 3, 67, 67, 71, 5, 149, 37, 61, 3, 83, 5, 173, 23, 31, 47, 283, 5, 29, 11, 103, 5, 107, 5, 31, 13, 7, 59, 709, 7, 367, 61, 37, 3, 131, 23, 269, 13, 139, 29, 569
Offset: 2

Views

Author

Reinhard Zumkeller, Aug 05 2004

Keywords

Examples

			n=5: 2^5=32=5*6+2, 3^5=243=5*48+3, 5^5 mod 5 = 0, 7^5=16807=5*3361+2, 11^5=161051=5*32210+1: a(5)=11.
		

Crossrefs

Programs

  • Mathematica
    With[{prs=Prime[Range[200]]},Table[SelectFirst[prs,PowerMod[#,n,n]==1&],{n,2,80}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Aug 31 2015 *)
  • PARI
    a(n) = my(p=2); while (Mod(p,n)^n !=1, p=nextprime(p+1)); p; \\ Michel Marcus, Feb 07 2021

A114448 Array a(n,k) = n^k (mod k) read by antidiagonals (k>=1, n>=1).

Original entry on oeis.org

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

Views

Author

Leroy Quet, Feb 14 2006

Keywords

Comments

Alternate description: triangular array a(n, k) = n^k (mod k) read by rows (n > 1, 0 < k < n). This is equivalent because a(n, k) = a(n-k, k). - David Wasserman, Jan 25 2007

Examples

			2^6 = 64 and 64 (mod 6) is 4. So a(2,6) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_, k_] := Mod[n^k, k]; Table[a[n - k + 1, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 12 2012 *)

Extensions

More terms from David Wasserman, Jan 25 2007

A155886 Least k such that 2^(2^k) = n (mod k).

Original entry on oeis.org

1, 3, 14, 11, 6, 1941491, 10, 83, 31, 13, 123, 35, 71, 27, 34913, 241, 18, 8059, 34, 349, 44, 25, 39, 100867561, 76, 231, 253, 66203, 57, 227, 139, 45, 184, 37, 111, 97, 55, 41, 103, 1099, 81, 66791, 53
Offset: 0

Views

Author

T. D. Noe, Jan 29 2009

Keywords

Comments

First occurrence of n in sequence A155836.
a(43) > 12500000. - Tyler Busby, Mar 15 2024

Crossrefs

Cf. A015910 (2^n mod n), A036236, A155836.

A180074 Squarefree semiprimes s=p*q, p

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 26, 33, 34, 38, 39, 46, 51, 57, 58, 62, 65, 69, 74, 82, 85, 86, 87, 93, 94, 106, 111, 118, 122, 123, 129, 133, 134, 141, 142, 145, 146, 158, 159, 166, 177, 178, 183, 185, 194, 201, 202, 205, 206, 213, 214, 217, 218, 219, 226, 237
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 14 2011

Keywords

Comments

It may seem that this is a subsequence of A162730, but it is not so, 131801 being the first counterexample. - Michel Marcus, Sep 19 2018

Crossrefs

Programs

  • Mathematica
    f[n_]:=With[{f=FactorInteger[n][[All,1]]},PowerMod[ 2,Times@@f,Times@@f] == 2^f[[1]]]; Select[Range[250],PrimeOmega[#]==2&&SquareFreeQ[#]&&f[#]&] (* Harvey P. Dale, Jun 06 2017 *)
  • PARI
    isok(n) = {if ((bigomega(n) == 2) && (omega(n) == 2), my(p = factor(n)[1, 1]); lift(Mod(2, n)^n) == 2^p);} \\ Michel Marcus, Sep 19 2018

Extensions

Definition and terms corrected by R. J. Mathar, Jan 14 2011

A374911 a(n) = a(2^n mod n) + a(3^n mod n), with a(0) = 1.

Original entry on oeis.org

1, 2, 3, 4, 3, 7, 7, 7, 3, 4, 7, 7, 7, 7, 7, 10, 3, 7, 11, 7, 5, 10, 7, 7, 7, 18, 7, 8, 21, 7, 7, 7, 3, 11, 7, 18, 25, 7, 7, 11, 5, 7, 17, 7, 10, 18, 7, 7, 14, 14, 21, 11, 10, 7, 29, 14, 7, 11, 7, 7, 13, 7, 7, 11, 3, 17, 7, 7, 10, 11, 21, 7, 7, 7, 7, 21, 10, 32, 11, 7, 5, 6, 7, 7, 14, 10, 7, 11, 19
Offset: 0

Views

Author

Bryle Morga, Jul 23 2024

Keywords

Comments

Conjectured to contain all positive integers. Here are the indexes where each of the first few positive integers appear:
1: 0
2: 1
3: 2, 4, 8, 16, 32, ... (2^k, k > 0)
4: 3, 9, ...
5: 20, 40, 80, 272, 320, 328, ...
6: 81, 66469, 144937, ...
7: 5, 6, 7, 10, 11, 12, 13,... (all primes appear except 2 and 3)
8: 27, 301, 729, 1099, 2107, 2187, 85085, 1594323, ...
Most solutions to a(n) = 5 seem to be divisible by 5 and all of them seem to be even. Why?
Are 3 and 9 the only solutions to a(n) = 4?

Crossrefs

Programs

  • Mathematica
    a[0]=1; a[n_]:=a[PowerMod[2,n,n]]+a[PowerMod[3,n,n]]; Array[a,89,0] (* Stefano Spezia, Jul 23 2024 *)
  • PARI
    a(n) = if (n==0, 1, a(lift(Mod(2,n)^n)) + a(lift(Mod(3,n)^n))); \\ Michel Marcus, Jul 25 2024
  • Python
    def a(n):
      return 1 if n == 0 else a(pow(2, n, n)) + a(pow(3, n, n))
    

Formula

a(p) = 7 for primes p except 2 and 3.
a(2^n) = 3 for n > 0.

A069049 Numbers k such that 2^k mod k = 2^phi(k) mod phi(k).

Original entry on oeis.org

1, 2, 4, 8, 14, 16, 22, 26, 32, 44, 46, 52, 62, 64, 92, 94, 108, 112, 118, 124, 128, 154, 164, 166, 188, 214, 222, 234, 236, 244, 252, 256, 258, 264, 288, 332, 334, 336, 358, 390, 412, 428, 438, 454, 456, 504, 512, 526, 534, 546, 576, 582, 630, 664, 668, 672
Offset: 1

Views

Author

Benoit Cloitre, Apr 03 2002

Keywords

Comments

Numbers k such that A015910(k) = A015910(A000010(k)). - Michel Marcus, Feb 11 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], PowerMod[2, #, #] == PowerMod[2, (e = EulerPhi[#]), e] &] (* Amiram Eldar, Feb 11 2021 *)
  • PARI
    f(n) = lift(Mod(2, n)^n); \\ A015910
    isok(k) = f(k) == f(eulerphi(k)); \\ Michel Marcus, Feb 11 2021
Previous Showing 51-60 of 64 results. Next