text:
The Story of the Tooth Fairy - Older Kids
Read this children's story about the adventures of Sarah and Marcus and their encounter with the Tooth Fairy.
It was a beautiful day in June. The sun was shining, warm and friendly. It was recess, Marcus's second favourite time of the school day. His most favourite time of the day was story time. Today, Ms. McKesson had been reading them his favourite book, Charlotte's Web—but Marcus wasn't very happy. In fact, he was worried and a little sad.
Marcus loved recess because then he got to talk to his best friend Sarah. They were in the same class, but she sat on the other side of the room. If the weather was good, like it was that day, they'd meet up to discuss what they'd learned in class that morning, share a snack, and plan what they'd do after school. Today, though, Marcus just moped about silently. And Sarah must have been sad too, because she was hanging out by herself on the other side of the playground.
In fact, all the kids on the playground that morning were all a little slouchy, a bit grouchy. Even their teachers could elicit only brief nods or a deflated "Yes, sir" or "Yes, miss." When the bell rang, everyone shuffled back into the school as though they carried the weight of the world on their shoulders.
At lunchtime, the doom and gloom deepened; it was sunny but it felt like a rain day with storms on the way. Marcus decided he must tell Sarah why he was sad. Sarah had decided the same thing, so when they sat down together in the lunch room the terrible calamity that had occurred was soon revealed.
Sarah said, "Marcus, I lost a tooth yesterday and put it under my pillow but—"
"—the tooth fairy didn't come to take it away," Marcus finished for her.
Sarah and Marcus stared at each other, their lunch boxes forgotten. Marcus looked quiet and sad and old before his time: "Me too," he whispered.
"Which tooth, Marcus?" Sarah leaned towards him; it was the same tooth, the top right one. They couldn't help but grin a little at each other then. As best friends, of course they would lose the same tooth on the same day; they did everything together. But what had happened to the tooth fairy? Why hadn't she come and taken their teeth away?
Sarah was worried and irritated. She'd planned to buy Marcus his favourite treat—popcorn—on their way home from school with that money! Marcus, of course, had also wanted to surprise Sarah with her favourite treat (also popcorn, of course; they are best friends, after all). Their silly grins quickly turned back into frowns.
All around them, their classmates were worried and talking quietly too. Marcus and Sarah had never experienced so glum a lunch break.
After lunch, things went from bad to worse. Ms. McKesson told her students that their guest speaker that afternoon had cancelled.
"Who was it, Ms. McKesson?" asked Ella; she sat behind Sarah.
"She's a dentist. We usually have her come in every June to talk about how care for your teeth over the summer. I see many of you have lost teeth recently," Ms. McKesson said, smiling fondly at her class. "She was also going to talk about losing your baby teeth and getting your adult teeth."
"I'm not a baby. They're not baby teeth," Dax muttered from near the back of the classroom.
Ms. McKesson laughed, "I know you're not babies; that's just the nickname for your first set of teeth. Those fall out and are replaced by the teeth you'll have until you're very old—old like me. So it's really important to know how to take care of them."
Silence in the classroom. Sarah finally asked what everyone was wondering, "Why isn't the dentist coming today…?"
Ms. McKesson looked a little nervous. "I…don't know, actually. I just got a memo saying there was an emergency she had to deal with, and she didn't know when she'd be able to come in."
All at once, the kids' quiet grumbling ended. Everyone loudly demanded to know why the tooth fairy hadn't collected their teeth that week. First the tooth fairy and now the dentist? Something fishy was going on.
Ms. McKesson tried to calm them. "I'm sure the tooth fairy is just running a little late and will visit you all tonight. And since Dr. Howard can't be here today, we're going to watch a short video about how to take care of your adult teeth, okay?"
She hurried over to the DVD player and pressed play. For a moment, the screen stayed blank. Then, suddenly, there was a close-up of a very scary looking man. The very scary man stared out at them from the TV; he grinned evilly. His evil grin was also hideous because his teeth were so awful! Never had Marcus and Sarah seen such terrible chompers. They looked at each other across the room and shuddered. Ms. McKesson had time to wonder only, "What's going on…?" before the man on the screen began to cackle like the villain from a story book.
"Hello, little children—wondering where your dentist is, hmmm?" He pulled out a mirror and gazed lovingly at his blackened, crooked, and broken teeth.
He cackled again. The he roared, "I AM CAPTAIN CAVITY! Actually, I have many names. My dear parents named me Tüth D. Kay, but I prefer my super-villain name. It's so much more dramatic, so memorable, don't you think?"
He smiled. It seemed as though he really could see the students and their teacher squirm as he bared his teeth at them.
"Dear kidlets, let me get to the point. I have kidnapped your precious tooth fairy—well, tooth fairies, to be exact. Didn't you know? Yes, every one of you has your very own tooth fairy. They form a worldwide band of dental superheroes. They work together to reward you for brushing and flossing. Oh yes, they're very good friends, quite lovely really, while I—"
Captain Cavity was getting cranky, so he pulled out his mirror again. A quick look into his rotten mouth restored his spirits.
"Where was I? Oh yes, all your tooth fairies are in my power. I'm going to whisk them away to my secret island, where there are no children at all! They will be very, very bored. And you"—his evil grin became the most evil, jagged grin of all time—"you will get no money when your teeth fall out. And not only that. Oh no, not only that! I will make you forget everything you ever learned about taking care of your teeth. And you will become my helpers, spreading cavities to all the other children of the world!"
Captain Cavity waved his wand—a cracked and frayed toothbrush—at them. Then he yelled, "Brush no more! Dance and run all the way to the candy store! Little teeth, rotten to the core!" The screen went blank.
"We have to do something!" Sarah and Marcus exclaimed. But all their classmates were asleep. Even Ms. McKesson had nodded off. And they were all talking in their sleep—about the candy they couldn't wait to eat.
Marcus and Sarah looked at each other. They were scared. They didn't know why they were awake and no one else was. But they had to stop Captain Cavity. Marcus's grandmother had been a dentist, so he knew that rotting teeth like the Captain's were unhealthy and painful.
"Let's go!" Marcus and Sarah rushed out the door. The school was silent. They looked into a few rooms and the principal's office for help, but the whole school was under Captain Cavity's spell. They would have to save the tooth fairies themselves.
Marcus's used the prinicipal's desk phone to call his Nan. It went right to voice mail: "Captain Cavity has captured almost all the other TFs. I've managed to elude him. Will try to get to the Secret Cave before he finds me. I will try to foil his plans from there." Beep.
Marcus hung up the phone. He was confused. How did his Nan know who Captain Cavity was? What were the TFs? And a Secret Cave??
Marcus and Sarah listened to the Vice Principal mutter in his sleep about sour soothers. They tried to figure out what was happening, but they were really stumped. They each called their parents and got no answer; they must have fallen under the Captain's spell too.
"I've got it!!" Sarah jumped up and grabbed Marcus's hand. "The TFs: tooth fairies!!"
Marcus brightened, then looked sad again. "Yes, but how does my Nan know that? She's just a dentist!"
They both got quiet. Then, together: "BECAUSE TOOTH FAIRIES ARE DENTISTS!!"
"Yes," said Ms. McKesson, walking in. She was rubbing her eyes, but she was awake. "I think it's an alter-ego. Like how Superman hides his real power by walking around as Clark Kent all day."
"Or," said Sarah, "How Barbara Gordon is a normal girl, but then she's also Batgirl…"
Marcus nodded. "But where is the Secret Cave?"
Ms. McKesson said, "Maybe my husband can tell us. He's a dentist too. Unless Captain Cavity already has him on that boring island…Let's go to his office and see if we can find anything."
Ms. McKesson drove Marcus and Sarah to her husband's clinic, but no one was there. And unlike Marcus's Nan, he hadn't left a note or anything. Sarah, Marcus and their teacher were really worried then.
Marcus looked around the quiet street. "I think my Nan's offices are around here. She just retired, though." Marcus's lip started to wobble just a little. "I don't want Captain Cavity to kidnap my Nan…!" Sarah hugged him while Ms. McKesson tried to cheer him. "I'm sure she's smarter than Captain Cavity. Where was her office, Marcus? We can look there next."
Marcus shook his head a little and felt braver. "It's at the corner of Selkirk and Croft." They got back into the car and in a few minutes were there. The street was empty, but lights of all colours were flashing out of the building's windows. They got out of the car and rushed to look inside.
Captain Cavity and Marcus's Nan were in pitched battle. The Captain was casting spells at her with his evil toothbrush wand. Marcus's Nan had a clean new toothbrush in one hand and a giant tube of toothpaste in the other; she was throwing spells back. The building was shaking because of all the magic being tossed around, but the Captain was weakening.
Marcus rushed in to help his grandmother. He was really angry at the Captain, so he threatened him with some dental floss. But his grandmother was speaking so nicely to the Captain that Marcus got confused. Ms. McKesson and Sarah weren't sure what to do, so they just grabbed some new toothbrushes and floss and waited.
Marcus's Nan—better known as Dr. Lee, dentist—was walking calmly towards Captain Cavity. "It's going to be okay, Tüth. I know going to the dentist can be scary. I promise I won't hurt you. In fact, I'll help make your teeth feel much better. That'll make you feel better. Your mouth won't hurt and you won't be so tired or cranky." Green and gold beams flew out of her magic toothbrush and healed Captain Cavity's top front teeth.
"No! No! I'm Captain Cavity! I am a super-villain! If I can't have pretty teeth, no one can!" He aimed his broken toothbrush at Dr. Lee but she ducked. The bad magic melted a little hole in the dentist's chair.
Dr. Lee kept talking sweetly to the Captain. Marcus, Sarah and Ms. McKesson also began encouraging him. Sarah offered to help him floss—which was very brave, because his teeth were very evil-looking. Marcus told him not to worry: he'd had a cavity once, too, but now he brushed his teeth after every meal so it wouldn't happen again. Ms. McKesson offered to read him a good story to calm him.
Captain Cavity tried to cast more spells, but he was getting tired. He kept missing and Dr. Lee kept magically healing his teeth. Eventually, he gave up. He even agreed to hear a story and brush his teeth. But before he could do either, he fell asleep.
Marcus ran to Dr. Lee and hugged her fiercely. Sarah jumped up and down in happiness, while Ms. McKesson looked relieved.
Dr. Lee gazed proudly at her grandson, "So you heard my message and figured out this was the Secret Cave?"
Marcus's jaw dropped. "This is the Secret Cave??"
Sarah jumped in, "Oh yes, of course it is: Selkirk and Croft. SC! Secret Cave! It's code, like in a comic book!"
Dr. Lee nodded.
"And you're a dentist and a tooth fairy." Dr. Lee nodded again.
"You're a super-hero! A real-live super-hero!!"
Dr. Lee looked a little shy now, but said, "Yes, I am also a tooth fairy."
Ms. McKesson looked thoughtful. "That means my husband is also a tooth fairy and a super-hero. I always wondered why he had so many capes."
"Now that Tüth is sleeping, I'll fix the rest of his teeth. That will break the spell on all the other TFs and bring them back from the boring island." Dr. Lee gently lifted the sleeping super-villain—who didn't look at all like a super-villain anymore. In fact, he just looked like a tired little boy. Dr. Lee winked at them as they left to go back to school, "Taking good care of your teeth is magical stuff."
The next day, everyone in Marcus and Sarah's class chattered happily as they sat down. The tooth fairy had visited all of them the night before. When the second bell rang, Ms. McKesson came in with a new student.
"I'd like to introduce you to T.K., who's joining our class today. Please make him feel welcome."
T.K. looked familiar to the other students, but they didn't know why. Marcus and Sarah knew him though. They were nervous until he smiled at them, his mouth full of healthy white teeth—though the top right one was missing, just like theirs. Then they knew it was okay.
"Real superheroes…" Sarah whispered happily under her breath.


text:
Q: How can I add the value into dictionary with the key from looping the list I have an excel file with 39 columns and 10000 rows.
I would like to store the key and value in list.
I can only come up with
    result = []
    temp = {}
    for x in range (1, 10000):
        for y in range (1, 39):
             # title and sheet also come from the excel
             temp[ title[y] ] : SHEET.cell_value(x, y)
             result.append(temp)

The code I wrote didn't running as I expected so how can I rewrite it?
I would like to expect the result would be:
result = [
    {'a':1, 'b':2, 'c':3, ...},
    {'a':1, 'b':2, 'c':3, ...},
    {'a':1, 'b':2, 'c':3, ...},
    ....
]

A: Using pandas, it may be easier...
import pandas as pd
df = pd.read_excel(my_url)
print(df.to_dict('r'))

A: I will use Pandas. To install first run from Cmd or terminal:
pip install -U pandas

Then import excel sheet with read_excel
import pandas as pd

df = pd.read_excel("EXCEL SHEET PATH")

And then to dictionary to_dict:
print(df.to_dict())

A: As others pointed out, using Pandas is probably the way to go. However, if you wish to implement a solution using plain Python, and assuming you have SHEET and title objects defined, this is probably what you want:
result = []
for x in range (1, 10000):
    temp = {}
    for y in range (1, 39):
         # title and sheet also come from the excel
         temp[ title[y] ] = SHEET.cell_value(x, y)
    result.append(temp)

redpajama_set_name: RedPajamaStackExchange


Plaine Products combines the healing properties of rosemary and mint with a hint of vanilla to comfort and calm. This body wash is blended with whole essential oils (instead of synthetic fragrance), and vegan ingredients to gently clean while restoring nutrients and powerful antioxidants to your skin. Daily use improves skin's tone and texture without drying.
To help stop the spread of single use plastic, Plaine Products created a new packaging system using aluminum bottles. Aluminum can be recycled without any quality loss, which means the bottles can be reused indefinitely. Plastic is typically downgraded when recycled so it can only be recycled once or twice and will eventually end up in a landfill to sit for hundreds of years. We are encouraging customers to return empty bottles to Fig & Flower to be sent back to Plaine Products when in need of a refill.
Ingredients: Organic Aloe Barbadensis Leaf Juice, Vegetable Glycerin, Saponified Oils of Coconut and Safflower Seed, Guar Gum, Organic Camellia, Sunflower and Ricebran Seed Oils. Chamomile, Sage and Quillaja Saponaria Extracts. Papaya and Pineapple Pulp Extracts. Bamboo Silk, Rosemary Oleoresin, Vitamin E Complex, Organic Green Tea, Geogard Ultra and Potassium Sorbate. Mint Arvenis Essential Oil. Essence of Rosemary, Mint and Vanilla..


text:
Q: Getting table values with Python I'm trying to get values from an html table using Python.
The html looks like this:

Invoice #	<input type=text value="1624140" size=12>

Company	<input type=text value="NZone" size=40>

Name:	<input type=text value="John Dot" size=40>

Address:	<input type=text value="Posie Row, Moscow Road" size=40>

City:	<input type=text value="Co. Dubllin" size=40>

Province	<input type=text value="" size=40>

Postal Code:	<input type=text value="" size=40>

Country:	<input type=text value="IRELAND" size=40>

Date:	<input type=text value="24.4.18" size=12>

Sub Total:	<input type=text value="93,24" size=40>

Combined Weight:	<input type=text value="1,24" size=40>

My code so far is:
from __future__ import print_function
import requests
import re

from bs4 import BeautifulSoup as bs

request = requests.get('url')

content = request.content

soup = bs(content, 'html.parser')

table = soup.findChildren('table')[1]

rows = table.findChildren('tr')

for row in rows:
cells = row.findChildren('td')
for cell in cells:
    cell_content = cell.getText()

 print(cell_content)

Output is:
Invoice #
Company
Name:
Address:
City:
Province
Postal Code:
Country:
Date:
Sub Total:
Combined Weight:

I would like final output like the following:
Invoice:1624140
Company:NZone
Name:John Dot
Address:Possie Row, Moscow Road
City:Co. Dublin
Province:
Postal Code:
Country:IRELAND
Date:24.4.18
Sub Total:93,24
Combined Weight:1,24

A: data = """

Invoice #	<input type=text value="1624140" size=12>

Company	<input type=text value="NZone" size=40>

Name:	<input type=text value="John Dot" size=40>

Address:	<input type=text value="Posie Row, Moscow Road" size=40>

City:	<input type=text value="Co. Dubllin" size=40>

Province	<input type=text value="" size=40>

Postal Code:	<input type=text value="" size=40>

Country:	<input type=text value="IRELAND" size=40>

Date:	<input type=text value="24.4.18" size=12>

Sub Total:	<input type=text value="93,24" size=40>

Combined Weight:	<input type=text value="1,24" size=40>

"""

from bs4 import BeautifulSoup

soup = BeautifulSoup(data, 'lxml')

for (td, inp) in zip(soup.find_all('td', align="right"), soup.find_all('input')):
    print(td.text, inp['value'])

Output is:
Invoice # 1624140
Company NZone
Name: John Dot
Address: Posie Row, Moscow Road
City: Co. Dubllin
Province
Postal Code:
Country: IRELAND
Date: 24.4.18
Sub Total: 93,24
Combined Weight: 1,24

A: How about a dictionary comprehension?
d = {k.findChild('td').getText().strip():k.findChild('input')['value'] for k in rows}

The result is a dictionary like this:
{'Address:': 'Posie Row, Moscow Road',
 'City:': 'Co. Dubllin',
 'Combined Weight:': '1,24',
 'Company': 'NZone',
 'Country:': 'IRELAND',
 'Date:': '24.4.18',
 'Invoice #': '1624140',
 'Name:': 'John Dot',
 'Postal Code:': '',
 'Province': '',
 'Sub Total:': '93,24'}

A: After Assigning row object, maybe you intended to write this? Because your current code has some indentation error. Please see if it fixes your issue.
rows = table.findChildren('tr')

for row in rows:
    cells = row.findChildren('td')
    for cell in cells:
        cell_content = cell.getText()
        print(cell_content)

A: Replace your bottom loop with this:
for row in rows:
    [row_title, row_val] = row.findChildren('td')

    print(row_title.getText(), row_val.input['value'])

This code unpacks the two cells in each row. It then gets the immediate child text of the left td for the row title and drills down into the right td for the value.


Horror Back Surgery: Kidney Removed!
11-6-18, WELLINGTON, FLA – Thanks to a serious surgical mistake, 51 yr old Maureen Pacheco is left without one of her fully functioning kidneys. In April 2016 she checked into Wellington Regional Medical Center to get the bones in her lower back fused in the wake of a car accident, [Palm Beach Post]. This is a fairly common operation on the spine. Difficulties were not expected. However, when Dr. Ramon Vazquez made the incision from the front of her body, he spotted an organ [healthy kidney] — which he believed to be a tumor, declared an emergency and removed it.
A month after the surgery, the center's pathologist found that the removed "tumor" was a healthy kidney that had fallen into the pelvic cavity (pelvic dystopia of the kidney). Dr Vasquez claims he was never informed that there was an MRI showing the kidney's lower position.
According to her lawsuit, Ms Pacheco will be on disability for the rest of her life - she was awarded $500,000.
at St. Vincent Hospital [here] in Worcester, Massachusetts USA because of a patient mix-up, an unidentified woman's kidney was removed in error.


text:
\section{Introduction and main results}
Let $E$ be an elliptic curve over $\mathbb{Q}$. For any prime number $p$ of good reduction, let $\lambda_E(p)$ be the trace of the Frobenius morphism of $E/\mathbb{F}_p$. Then the number of points on the reduced curve modulo $p$ equals $\#E(\mathbb{F}_p)= p+1- \lambda_E(p)$. By Hasse's theorem, there exists a unique angle $0\le \theta\le \pi$ such that
$$\lambda_E(p)=\sqrt{p}\left(e^{i\theta_E(p)}+e^{-i\theta_E(p)}\right)=
2\sqrt{p}\cos \theta_E(p).$$
It is natural to ask how $\theta_E(p)$ varies with $p$. \newline

If $E$ has complex multiplication(CM), the answer is easy. By Deuring's work \cite{Deur} half of the primes satisfy $\lambda_E(p)=0$ (these primes are called ``supersingular primes''), and for the remaining half of the primes the angles $\theta_E(p)$ are distributed uniformly in the interval $[0,\pi]$.  The reason is that, in the CM-case, the primes $p$ with $\theta_E(p)$ in a fixed range are given by $p=f(u,v)$, where $f(u,v)$ is a certain positive definite binary quadratic form, with $|u|/p$ in the corresponding range. The uniform distribution follows now from the work of Hecke \cite{Heck1}, \cite{Heck2} on prime ideals of imaginary quadratic number fields in sectors. \newline

The situation is more complicated when $E$ does not have complex multiplication. For this case, Sato and Tate \cite{Tate} formulated the following conjecture.\\ \\
{\bf Sato-Tate Conjecture:} Suppose $E$ is an elliptic curve over $\mathbb{Q}$ which
does not admit complex multiplication. For any $0\le \theta_1\le \theta_2\le
\pi$, and $x\ge1$, let
$$
\pi_E^{\theta_1,\theta_2}(x):=|\{p\le x\ :\ \theta_1\le \theta_E(p)\le
\theta_2\}|.
$$
Then
$$
\lim\limits_{x\rightarrow\infty} \frac{\pi_E^{\theta_1,\theta_2}(x)}{\pi(x)}
=\frac{2}{\pi}\int\limits_{\theta_1}^{\theta_2} \sin^2\theta\ {\rm d}\theta,
$$
where $\pi(x)$ is the number of primes not exceeding $x$. \newline

Let
$$
\Theta_E^{\theta_1,\theta_2}(x):=\sum\limits_{\substack{p\le x\\
\theta_1\le \theta_E(p)\le \theta_2}} \log p.
$$
Then the Sato-Tate conjecture is equivalent to
\begin{equation} \label{ST}
\lim\limits_{x\rightarrow\infty} \frac{\Theta_E^{\theta_1,\theta_2}(x)}{x}
=\frac{2}{\pi}\int\limits_{\theta_1}^{\theta_2} \sin^2\theta\ {\rm d}\theta.
\end{equation}
By a change of variables in \eqref{ST}, the conjecture can be stated in
the following equivalent way. \\ \\
{\bf Sato-Tate Conjecture:}
Suppose $E$ is an elliptic curve over $\mathbb{Q}$ which does not admit complex multiplication. For any $-1\le \alpha\le \beta\le 1$, and $x\ge 1$, let
\[ \Theta_E(\alpha,\beta;x):=\sum\limits_{\substack{p\le x\\ \alpha\le \lambda_E(p)/(2\sqrt{p})\le\beta}}\log p. \]
Then
\[ \lim\limits_{x\rightarrow\infty} \frac{\Theta_E(\alpha,\beta;x)}{x} =\frac{2}{\pi}\int\limits_{\alpha}^{\beta} \sqrt{1-t^2}\ {\rm d}t. \]

In \cite{CHT}, \cite{HSBT} and \cite{Tayl}, L. Clozel, M. Harris, N. Shepherd-Barron and R. Taylor have proved the Sato-Tate conjecture for all elliptic curves $E$ over totally real fields (in particular, over $\mathbbm{Q}$) satisfying the mild condition of having multiplicative reduction at some prime. In the following, we say some few words about the background of their proof.

It can be shown that the Sato-Tate conjecture holds true if and only if the matrices
$$
\left( \begin{array}{*{2}{c}} e^{i\theta_E(p)} & 0 \\ 0 & e^{-i\theta_E(p)}\\ \end{array} \right)
$$
are uniformly distributed with respect to the Haar measure in the space
of conjugacy classes of the compact group SU$_2(\mathbb{C})$ of unitary
$2\times 2$ matrices over $\mathbb{C}$ with determinant 1.  Building on this observation, Langlands \cite{Lang} and Serre in the letter at the end
of \cite{Sh} related the Sato-Tate conjecture to
symmetric power $L$-functions associated to the curve $E$. These $L$-functions are (in normalized form) defined by
$$
L_m(E;s):=\prod\limits_{p\nmid \Delta(E)}\ \prod\limits_{j=0}^m
\left(1-e^{(m-2j)i\theta_E(p)} p^{-s}\right)^{-1},
$$
for $m=1,2,...$,  where $\Delta(E)$ is the discriminant of
$E$. $L_m(E;s)$ converges absolutely for $\Re s>1$. Langlands proved
that the Sato-Tate conjecture holds if for all non-negative integers
$m$, $L_m(E;s)$ can be extended to an analytic function on $\Re s\ge 1$
and does not vanish on the line $\Re s=1$. By an argument given in
\cite{MuMu}, the existence of an analytic continuation of $L_m(E;s)$ to
the closed half plane $\Re s\ge 1$ implies the non-vanishing of
$L_m(E;s)$ on the line $\Re s=1$.  Langlands conjectured that the above symmetric power $L$-functions
extend to an entire function and coincide with certain automorphic
$L$-functions.  This conjecture implies the Sato-Tate conjecture by the
above consideration.  See \cite{Murt} for an overview of these results. \newline

Recently, the authors of \cite{CHT}, \cite{HSBT} and \cite{Tayl} have proved that, under the above-mentioned mild restriction on $E$, these symmetric power
$L$-functions have meromorphic continuation to the whole complex plane,
satisfy the expected functional equation and are holomorphic and non-zero
for $\Re s \geq 1$.  These conditions suffice to prove the Sato-Tate
conjecture.  We note here that our results, which we shall presently
state, do not follow from those in \cite{CHT}, \cite{HSBT} and \cite{Tayl} due to the lack of information about the order of magnitude of the error term in the Sato-Tate conjecture. In particular, as far as we know, there are no results in the literature about uniformity of this error term
with respect to the coefficients $a$ and $b$ of the elliptic curves. \newline

To establish an asymptotic estimate for $\pi_E^{\theta_1,\theta_2}(x)$ or $\Theta_E^{\theta_1,\theta_2}(x)$ if the angle $[\theta_1,\theta_2]$ is very small (that is, $\theta_2-\theta_1<x^{-\delta}$ for some positive $\delta$), one would need zero density estimates for these symmetric power $L$-functions which do not depend too much on $m$.  It seems that there are no zero density estimates in the literature which are sufficient for this purpose. In this paper we prove that the expected asymptotic estimate for small angles
holds on average over elliptic curves
$$
E(a,b) \ : \ Y^2=X^3+aX+b
$$
with $\vert a\vert \le A$, $\vert b\vert \le B$. For the sake of
technical simplicity, we work with $\Theta_{E(a,b)}(\alpha,\beta;x)$
with a
small interval $[\alpha,\beta]$ instead of
$\Theta_{E(a,b)}^{\theta_1,\theta_2}(x)$
with a small angle $[\theta_1,\theta_2]$. We further suppose without
loss of generality that $\alpha$ and $\beta$ are positive. The case when
$\alpha$ and $\beta$ are negative can be treated in a similar way. The
distribution of supersingular primes $p$ with $\lambda_p=0$ was investigated in
\cite{FoMu}.\newline

In the sequel, we set
\begin{equation}\label{Fdef}
F(\alpha,\beta):=\frac{2}{\pi}
\int\limits_{\alpha}^{\beta} \sqrt{1-t^2}\ {\rm d}t \; \mbox{ and } \;
\gamma:=\beta-\alpha.
\end{equation}
Moreover, following the general convention, we use $\varepsilon$ to denote a small positive constant which may not be the same at each occurrence.
Our first result is:

\begin{theorem} \label{TH1}
Let $x\ge 1$, $0< \alpha\le \beta\le 1$ and $A,B\ge 1$.
Assume that $x^{\varepsilon-5/12}\le \gamma/\beta \le x^{-\varepsilon}$ and $F(\alpha,\beta)\ge x^{-1/2+\varepsilon}$.
Then, for every $c>0$, we have
\[ \frac{1}{4AB}\sum\limits_{|a|\le A} \sum\limits_{|b|\le B} \Theta_{E(a,b)}(\alpha,\beta;x) = xF(\alpha,\beta) +O\left(\frac{xF(\alpha,\beta)}{\log^c x}+x^{3/2+\varepsilon}
\left(F(\alpha,\beta)
\left(\frac{1}{A}+\frac{1}{B}\right)+
\frac{F(\alpha,\beta)^{1/2}}{(AB)^{1/2}}\right)\right), \]
where the implied $O$-constant depends only on $c$.
\end{theorem}

From Theorem~\ref{TH1}, we immediately deduce the following average result for small intervals $[\alpha,\beta]$.

\begin{corollary} \label{CO1}
Let $x\ge 1$, $0< \alpha\le \beta\le 1$. Assume that
$x^{\varepsilon-5/12}\le \gamma/\beta \le x^{-\varepsilon}$ and $F(\alpha,
\beta)\ge x^{-1/2+\varepsilon}$.
Then, if $A,B>x^{1/2+\varepsilon}$ and
$AB>x^{1+\varepsilon}/F(\alpha,\beta)$, we have, for every $c>0$,
\[ \frac{1}{4AB}\sum\limits_{|a|\le A} \sum\limits_{|b|\le B} \Theta_{E(a,b)}(\alpha,\beta;x) =xF(\alpha,\beta) \left(1+O\left(\frac{1}{\log^c x}\right)\right), \]
where the implied $O$-constant depends only on $c$.
\end{corollary}

We note that under the assumptions in Corollary~\ref{CO1} the contribution of CM-curves among the curves $E(a,b)$ is negligible since it is well-known that the number of these curves with $|a| \leq A$ and $|b| \leq B$ under consideration is $O(A+B)$. Therefore Theorem~\ref{TH1} and Corollary~\ref{CO1} are consistent with the Sato-Tate Conjecture. \newline

Moreover, we shall establish the following second moment estimate.

\begin{theorem} \label{TH2}
Let $x\ge 1$, $0< \alpha\le \beta\le 1$.
Assume that $x^{\varepsilon-5/12}\le \gamma/\beta \le x^{-\varepsilon}$,
$F(\alpha,\beta)\ge x^{-1/2+\varepsilon}$,
$A,B>x^{1/2+\varepsilon}$ and
$AB>x^{1+\varepsilon}/F(\alpha,\beta)$. Then, for every $c>0$, we have
\begin{equation} \label{T3}
\begin{split}
\frac{1}{4AB}& \sum\limits_{|a|\le A} \sum\limits_{|b|\le B} \left\vert \Theta_{E(a,b)}(\alpha,\beta;x)-xF(\alpha,\beta)\right\vert^2\\
\ll& \frac{x^2F(\alpha,\beta)^2}{\log^{c} x}+ x^{\varepsilon}  \Bigg(xF(\alpha,\beta)\log\log(10AB) + x^3F(\alpha,\beta)^2\left(\frac{1}{A}+\frac{1}{B}\right)+ \frac{x^3F(\alpha,\beta)}{(AB)^{1/2}}\Bigg),
\end{split}
\end{equation}
where the implied $\ll$-constant depends only on $c$.
\end{theorem}

Theorem~\ref{TH2} implies that the expected asymptotic estimate holds
for almost all elliptic curves in a sufficiently
large box even if the interval $[\alpha,\beta]$ is very small.

\begin{corollary} \label{CO2}
Let $x\ge 1$, $0< \alpha\le \beta\le 1$. Assume that
$x^{\varepsilon-5/12}\le \gamma/\beta \le x^{-\varepsilon}$,
$F(\alpha,\beta)\ge x^{-1/2+\varepsilon}$,
$A,B>x^{1+\varepsilon}$, $x^{2+\varepsilon}/F(\alpha,\beta)^2<AB<
\exp(\exp(x^{1-\varepsilon}))$.
Then, for any $c,d>0$, we have
$$
\Theta_{E(a,b)}(\alpha,\beta;x)
=xF(\alpha,\beta)
\left(1+O\left(\frac{1}{\log^c x}\right)\right)
$$
for all $|a|\le A$, $|b|\le B$ with at most $O\left(AB/(\log x)^d\right)$
exceptions. Here the implied $O$-constant depends only on $c$ and $d$.
\end{corollary}

Our method is essentially a combination of those used  in \cite{Baie} and \cite{DaPa}.  However, we need to modify these methods appropriately to make them applicable to short intervals. Parts of our section 4 follow closely to the work of David-Pappalardi in \cite{DaPa} and parts of sections 5, 6 and 7 follow closely to the work of Baier in \cite{Baie}.  We included these computations for the sake of completeness. \newline

Corollaries~\ref{CO1} and~\ref{CO2} improve some results in a recent
preprint of James and Yu \cite{JaYu} on the Sato-Tate Conjecture on
average. They dealt only with fixed intervals $[\alpha,\beta]$, whereas
in our present paper the length of this interval may depend on the
parameter $x$. Moreover, our method is different from that in
\cite{JaYu}. James and Yu used the circle method which is avoided in the
present paper.  It is also note-worthy that Banks and Shparlinski
\cite{WDBIES} have recently improved our results in certain cases using very
different methods while in other cases our results are better.

\section{General approach}
As in \cite{DaPa} and \cite{Baie}, the following observations are our
starting point.

\begin{lemma} [Deuring] \label{LE1}
For $0<r< 2\sqrt{p}$, the number of $\mathbb{F}_p$-isomorphism classes of
elliptic curves over $\mathbb{F}_p$ with $p+1-r$ points is the total number of
ideal classes of
the ring $\mathbb{Z}[(D+\sqrt{D})/2]$, where $D=r^2-4p$ is a negative integer which
is congruent to $0$ or $1$ modulo $4$. This number is the Kronecker class
number $H(r^2-4p)$.
\end{lemma}

\begin{lemma} \label{LE2}
Suppose that $p\not=2,3$. Then any elliptic curve over $\mathbb{F}_p$ has a model
$$
E\ :\ Y^2=X^3+aX+b
$$
with $a,b\in \mathbb{F}_p$. The elliptic curves $E'(a',b')$ over $p$, which are
$\mathbb{F}_p$-isomorphic to $E$, are given by all the choices
$$
a'=\mu^4a \ \ \ \ \mbox{\rm and } \ \ \ b'=\mu^6b
$$
with $\mu\in \mathbb{F}_p^*$. The number of such $E'$ is
\begin{eqnarray*}
(p-1)/6, & &  \mbox{\rm if } a=0\ \mbox{\rm and } p\equiv 1\ \pmod{3};\\
(p-1)/4, & &  \mbox{\rm if } b=0\ \mbox{\rm and } p\equiv 1\ \pmod{4};\\
(p-1)/2, & &  \mbox{\rm otherwise.}
\end{eqnarray*}
\end{lemma}

Lemmas~\ref{LE1} and~\ref{LE2} imply that the number of curves $E(a,b)$ with $a,b\in \mathbb{Z}$, $0\le a,b<p$ and $\lambda_{E(a,b)}(p)=r$ is
\begin{equation} \label{NC}
\frac{p H(r^2-4p)}{2}+O(p).
\end{equation}
Now we write
\begin{equation} \label{goal}
\frac{1}{4AB} \sum\limits_{|a|\le A} \sum\limits_{|b|\le B} \Theta_{E(a,b)}(\alpha,\beta;x) = \frac{1}{4AB}\sum\limits_{p\le x}\log p \sum\limits_{2\sqrt{p}\alpha\le r\le 2\sqrt{p}\beta} \sharp\{|a|\le A,\ |b|\le B\ :\ \lambda_p(E(a,b))=r\}.
\end{equation}
Using \eqref{NC}, the term on the right-hand side of \eqref{goal} is
\begin{equation} \label{DaPa}
\frac{1}{4AB} \sum\limits_{p\le x}\log p \sum\limits_{2\sqrt{p}\alpha\le r\le 2\sqrt{p}\beta} \left(\frac{2A}{p}+O(1)\right) \left(\frac{2B}{p}+O(1)\right)\left(\frac{p H(r^2-4p)}{2}+O(p)\right).
\end{equation}
Here the error terms are estimated trivially.  A more precise evaluation
of the error term will be carried out in section 6.  The main term in \eqref{DaPa} is
\begin{equation} \label{Main}
\sum\limits_{p\le x}\log p \sum\limits_{2\sqrt{p}\alpha\le
r\le 2\sqrt{p}\beta} \frac{H(r^2-4p)}{2p}.
\end{equation}
We shall derive an asymptotic estimate for this main term in section 4.

\section{Preparations for the estimation of the main term}
In this section we assemble some lemmas which we shall later need for the
estimation of the main term. First, we express $H(r^2-4p)$ in terms
of the value of a certain Dirichlet $L$-function at the point $s=1$.
For any negative integer $d$ let $\chi_d$ be the character modulo $|d|$ given
by
$$
\chi_d(n)=\left(\frac{d}{n}\right),
$$
where the right-hand side is the Jacobi symbol. Furthermore, let
$L(s,\chi)$ be the Dirichlet $L$-function associated to a Dirichlet character
$\chi$. Then we have the following.

\begin{lemma} \label{Hlemma} If $0<r< 2\sqrt{p}$, then
$$
H(r^2-4p)=\frac{1}{\pi}\sum\limits_{\substack{f,d\\ r^2-4p=df^2\\ d\equiv 0,1\
\bmod{4}}} \sqrt{|d|}L(1,\chi_d).
$$
\end{lemma}
\begin{proof} This follows from (23) and (30) in \cite{DaPa}. \end{proof}

We shall also need the classical P\'olya-Vinogradov inequality for character sums. \newline

\begin{lemma} \label{PolyaVinolemma}
Let $q,N\in \mathbbm{N}$, $q\ge 2$ and $\chi$ be any non-principal character
modulo $q$. Then
$$
\sum\limits_{n\le N} \chi(n)\ll \sqrt{q}\log q.
$$
\end{lemma}
\begin{proof} This is the well-known inequality of P\'olya-Vinogradov and can be found as Theorem 12.5 in \cite{IwKo}. \end{proof}

In the sequel, for $x,y\ge 1$ and $(a,q)=1$, we set
\begin{equation} \label{defpsi1}
\Theta(x,y;q,a):=\sum\limits_{\substack{x<p\le x+y\\ p \equiv a\
\bmod{q}}} \log p, \; \mbox{and} \; E(x,y;q,a):=\Theta(x,y;q,a)-\frac{y}{\varphi(q)}.
\end{equation}
We shall need the following estimate of $E(x,y;q,a)$ for small moduli $q$.

\begin{lemma} \label{arithlemma}
Let $c_1,c_2,\varepsilon>0$ be given.
Then, if $x\ge 2$,
$x^{7/12+\varepsilon}\le y\le x$, $q\le (\log x)^{c_1}$ and
$(a,q)=1$, we have
\begin{equation} \label{Estimate}
E(x,y;q,a)\ll \frac{y}{(\log x)^{c_2}},
\end{equation}
where the implied $\ll$-constant depends only on $c_1$, $c_2$ and
$\varepsilon$.
\end{lemma}
\begin{proof} For $q=1$ this result is well-known. Its proof uses density estimates for the zeros of the Riemann zeta function as well as Vinogradov's zero-free region (see the proof of Theorem 12.8. in \cite{Ivic}). In a similar manner one can prove \eqref{Estimate} for any $q\le (\log x)^{c_1}$ by writing $E(x,y;q,a)$ as a linear combination of character sums and using density estimates for the zeros of the corresponding Dirichlet $L$-functions (see section 10.4 in \cite{IwKo}) as well as an analogue of Vinogradov's zero-free region for these $L$-functions which can be established by a similar method as for the Riemann zeta function (see section 8.5 in \cite{IwKo}). \end{proof}

We also need the following classical large sieve inequality for Dirichlet characters.

\begin{lemma} [Large Sieve] \label{lslemma}
Let $\{ a_n \}$ be a sequence of complex numbers.  Suppose that $M \in \mathbb{Z}$, $N, Q \in \mathbb{N}$. Then we have
\begin{equation} \label{classlseq}
\sum_{q=1}^Q \frac{q}{\varphi(q)} \sideset{}{^{\star}}\sum_{\chi \bmod q} \left| \sum_{n=M+1}^{M+N} a_n \chi (n) \right|^2 \leq (Q^2 +N ) \sum_{n=M+1}^{M+N} |a_n|^2,
\end{equation}
where $\sideset{}{^{\star}}\sum$ henceforth denotes the sum over primitive characters to the specified modulus.
\end{lemma}
\begin{proof} See for example \cite{Daven} for the proof. \end{proof}

We are now ready to state the following generalization of the Barban-Davenport-Halberstam Theorem for short intervals.

\begin{lemma} \label{BDVlemma}
Let $c_3,\varepsilon>0$ be given. Then, if $x\ge 2$, $x^{7/12+\varepsilon}\le y\le x$ and $1\le Q\le y$, we have
\begin{equation} \label{BDV}
\sum\limits_{q\le Q} \sum\limits_{\substack{a=1\\ (a,q)=1}}^q |E(x,y;q,a)|^2\ll Qy(\log x)^2 + \frac{y^2}{(\log x)^{c_3}},
\end{equation}
where the implied $\ll$-constant depends only on $c_3$ and $\varepsilon$.
\end{lemma}
\begin{proof} For $y=x$ this is the well-known classical Barban-Davenport-Halberstam Theorem (see section 17.4 in \cite{IwKo}). Its proof uses the Siegel-Walfisz Theorem for small moduli $q\le (\log x)^A$ and the large sieve, Lemma \ref{lslemma}, for the sum over the remaining moduli $q>(\log x)^A$.  To establish \eqref{BDV} for any $y$ in the range $x^{7/12+\varepsilon}\le y\le x$, one may use a similar method, where the Siegel-Walfisz Theorem is replaced by Lemma~\ref{arithlemma}.
\end{proof}

Furthermore, as in \cite{DaPa}, we set
\begin{equation} \label{constantfrn}
c_f^r(n):=\sum\limits_{\substack{a=1\\ (a,4n)=1\\ (r^2-af^2,4n)=4}}^{4n}
\left(\frac{a}{n}\right)
\end{equation}
and
\begin{equation} \label{LTconstant}
K_r:=\prod\limits_{l|r} \left(1-\frac{1}{l^2}\right)^{-1}
\prod\limits_{l\nmid r} \frac{l(l^2-l-1)}{(l-1)(l^2-1)},
\end{equation}
where the first product on the right-hand  side runs over all prime divisors
$l$ of $r$, and the second product runs over all primes $l$ which do not
divide $r$. We shall need the following asymptotic estimate for the estimation
of the main term in section 4.

\begin{lemma} \label{maintermlemma}
Let $U,V\ge 1$ and $r>0$. Then
$$
\sum\limits_{n\le U}\sum\limits_{\substack{f\le V\\ (2r,f)=1}}
\frac{c_f^r(n)}{fn\varphi\left(nf^2\right)}=
K_r+O\left(\frac{1}{\sqrt{U}}+\frac{1}{V^2}\right),
$$
with an absolute $O$-constant.
\end{lemma}
\begin{proof} This follows from (22) and Lemma 4.1 in \cite{DaPa}. We note that these estimates do not depend on $r$.\end{proof}

Finally, we shall need the following estimate for $K_r$ on average.

\begin{lemma} \label{LTconstantlemma}
Let  $u\ge 0$ and $v\ge 1$. Then, for $K_r$ being defined as in
\eqref{LTconstant}, we have
\begin{equation} \label{Kaverage}
\sum\limits_{u<r\le u+v} K_r = v+O(1),
\end{equation}
with an absolute $O$-constant.
\end{lemma}
\begin{proof} Let
$$
C=\prod\limits_{l} \left(1+\frac{1}{l(l^2-l-1)}
\right)^{-1} \ \ \mbox{ and } \ \
f(r):=\prod\limits_{l|r} \left(1+\frac{1}{l^2-l-1}\right).
$$
Then
\begin{equation} \label{Kidentity}
K_r=f(r)C.
\end{equation}
In the following, we estimate $f(r)$ on average over intervals. To this end,
we define
the arithmetic function $g$ to be the Dirichlet convolution of $f$ and
the M\"obius function $\mu$, that is, $g=f\ast \mu$. Then it is easy to
check that
$$
g(n)=\frac{\mu(n)^2}{\prod\limits_{l|n} (l^2-l-1)}.
$$
Using this and the M\"obius inversion formula, we deduce
\begin{equation} \label{faverage}
\sum\limits_{u<r\le u+v} f(r) = \sum\limits_{u<r\le u+v} \sum\limits_{d\vert r} g(d) = \sum\limits_{d=1}^{\infty} g(d)\left(\frac{v}{d}+O(1)\right) = v\sum\limits_{d=1}^{\infty} \frac{g(d)}{d} +O(1) = vC^{-1}+O(1).
\end{equation}
Now \eqref{Kaverage} follows from \eqref{Kidentity} and \eqref{faverage}.
\end{proof}

\section{Estimation of the main term}
We are now ready to prove the following asymptotic estimate for the main term
in \eqref{Main}.
\begin{theorem} \label{maintermtheorem}
Let $x\ge 2$ and $0< \alpha\le \beta\le 1$.
Suppose that $x^{2\varepsilon-5/12}
\le \gamma/\beta\le
x^{-\varepsilon}$ and $\alpha\ge x^{-1/2+\varepsilon}$. Then, for any
$c>0$, we have
$$
\sum\limits_{p\le x}\log p \sum\limits_{2\sqrt{p}\alpha\le
r\le 2\sqrt{p}\beta} \frac{H(r^2-4p)}{2p} =
xF(\alpha,\beta)\left(1+O \left( \frac{1}{\log^c x}\right) \right).
$$
\end{theorem}

\begin{proof} We have
\begin{equation} \label{Homer}
\begin{split}
\sum\limits_{p\le x} \log p \sum\limits_{2\sqrt{p}\alpha\le
r\le 2\sqrt{p}\beta} \frac{H(r^2-4p)}{2p} = & \sum\limits_{1\le r\le x^{2\varepsilon}\alpha\beta^{6/5}/ \gamma^{6/5}} \ \sum\limits_{r^2/(2\beta)^2\le p\le r^2/(2\alpha)^2}\frac{H(r^2-4p)}{2p}\log p \\
& \hspace*{.25in} + \sum\limits_{x^{2\varepsilon}\alpha\beta^{6/5}/ \gamma^{6/5} < r \le 2\sqrt{x}\alpha} \ \sum\limits_{r^2/(2\beta)^2\le p\le r^2/(2\alpha)^2}\frac{H(r^2-4p)}{2p}\log p \\
& \hspace*{.25in} +\sum\limits_{ 2\sqrt{x}\alpha< r\le 2\sqrt{x}\beta} \ \sum\limits_{r^2/(2\beta)^2\le p\le x}\frac{H(r^2-4p)}{2p}\log p, \\
& = S_1+S_2+S_3, \; \mbox{say},
\end{split}
\end{equation}
where we have taken into account the condition $\gamma/\beta \geq x^{2\varepsilon - 5/12}$.We shall deal with $S_1$ and $S_3$ later.  Using Lemma \ref{Hlemma}, we may write $S_2$ in the form
\begin{equation} \label{Burns}
\frac{1}{2\pi}
\sum\limits_{x^{2\varepsilon}\alpha\beta^{6/5}/ \gamma^{6/5} \leq r\le 2\sqrt{x}\alpha} \sum_{f \leq 2\sqrt{x}} \frac{1}{f}
\sum\limits_{p \in
S_{f,r}(r^2/(2\alpha)^2)} \frac{\sqrt{4p-r^2}}{p} L(1,\chi_d) \log p,
\end{equation}
where
\[ S_{f,r}(t) = \left\{ \left( \frac{r}{2 \beta} \right)^2 \leq p \leq t : f^2|(4p-r^2), d = \frac{r^2-4p}{f^2} \equiv 0,1 \bmod{4} \right\}. \]
We now develop an asymptotic estimate for the inner-sums over $f$ and $p$ of \eqref{Burns} for every $r$.  It suffices to restrict our attention only to odd $r$'s as the arguments are similar for even $r$'s.  By partial summation, we have
\begin{equation} \label{Marge}
\begin{split}
&\sum_{f \leq 2 \sqrt{x}} \frac{1}{f}
\sum_{p \in S_{f,r}(r^2/(2\alpha)^2)}
\frac{\sqrt{4p-r^2}}{p} L(1,\chi_d) \log p\\
 & = \frac{4\alpha\sqrt{1-\alpha^2}}{r} \sum_{f \leq 2 \sqrt{x}} \frac{1}{f} \sum_{p \in S_{f,r}(r^2/(2\alpha)^2)} L(1, \chi_d) \log p \\
& \hspace*{.25in} - \int\limits_{r^2/(2\beta)^2}^{r^2/(2\alpha)^2} \sum_{f \leq 2 \sqrt{x}} \frac{1}{f} \sum_{p \in S_{f,r}(t)} L(1, \chi_d) \log p \frac{\mathrm{d}}{\mathrm{d} t} \left(\frac{2}{\sqrt{t}}\sqrt{1-\frac{r^2}{4t}}\right) \mathrm{d} t,
\end{split}
\end{equation}
where $d=(r^2-4p)/f^2$. \newline

For a fixed $U>0$ to be chosen later, we have
\begin{equation} \label{Lest}
L(1, \chi_d) = \sum_{n \leq U} \left( \frac{d}{n} \right) \frac{1}{n} + O \left( \frac{\sqrt{|d|} \log |d|}{U} \right) = \sum_{n \leq U} \left( \frac{d}{n} \right) \frac{1}{n} + O \left( \frac{\sqrt{|p|} \log |p|}{fU} \right),
\end{equation}
using the P\'olya-Vinogradov inequality, Lemma~\ref{PolyaVinolemma}. We further note that
\begin{equation} \label{dist}
\frac{r^2}{(2\alpha)^2}-\frac{r^2}{(2\beta)^2} \ll \frac{r^2\gamma}{\beta\alpha^2}.
\end{equation}\newline

Using \eqref{Lest}, \eqref{dist} and the fact that $r \leq 2 \sqrt{x} \alpha$, we get that the double sum in the integrand on the right-hand side of \eqref{Marge} is
\begin{equation} \label{bart}
 \sum_{\substack{f \leq 2\sqrt{x} \\ (2r,f)=1}} \frac{1}{f} \sum_{n \leq U} \frac{1}{n} \sum_{p \in S_{f,r}(t)} \left( \frac{d}{n} \right) \log p + O \left( \frac{x^{3/2}\gamma \log^2 x}{\beta U} \right),
\end{equation}
where we have taken into account that $\gamma/\beta \geq 1/x$.
The coprimality relation $(2r,f)=1$ in the above comes in the following way.  As $r$ is odd, if $f^2|r^2-4p$, then $f$ is also odd and $d=(r^2-4p)/f^2 \equiv 1 \pmod{4}$.  Moreover since $(r,f)|p$, and $p \geq r$ if $p$ is neither 2 nor 3, we have $(r,f)=1$. The possible contribution of $p=2,3$ can be absorbed into
the error term if $U\le x^{3/2}\gamma/\beta$ which will be the case by our later choice of $U$. \newline

For a fixed parameter $V$ with $1 \leq V \leq 2\sqrt{x}$ to be chosen later, the first term in \eqref{bart} is
\[  \sum_{\substack{f \leq V \\ (2r,f)=1}} \frac{1}{f} \sum_{n \leq U} \frac{1}{n} \sum_{p \in S_{f,r}(t)} \left( \frac{d}{n} \right) \log p +  \sum_{\substack{V< f \leq 2\sqrt{x} \\ (2r,f)=1}} \frac{1}{f} \sum_{n \leq U} \frac{1}{n} \sum_{p \in S_{f,r}(t)} \left( \frac{d}{n} \right) \log p. \]
Using \eqref{dist} and $r\le 2\sqrt{x}\alpha$, the second term of the above is
estimated as
\begin{eqnarray*}
\left| \sum_{\substack{V< f \leq 2\sqrt{x} \\ (2r,f)=1}} \frac{1}{f} \sum_{n \leq U} \frac{1}{n} \sum_{p \in S_{f,r}(t)} \left( \frac{d}{n} \right) \log p \right| & \leq & \log x \log U \sum_{V<f \leq 2\sqrt{x}} \frac{1}{f} \sum_{\substack{r^2/(2\beta)^2 \leq n \leq t \\ n \equiv \bar{4}r^2 \bmod{f^2}}} 1 \\
& \ll & x \frac{\gamma}{\beta} \log x \log U \sum_{V<f \leq 2\sqrt{x}} \frac{1}{f^3} \\
& \ll & \frac{x \gamma \log x \log U}{\beta V^2},
\end{eqnarray*}
where $\bar{4}$ is an integer such that $\bar{4} \times 4 \equiv 1 \pmod{f^2}$. \newline

Therefore, \eqref{bart} may be re-written as
\begin{equation} \label{lisa}
\sum_{\substack{f \leq V \\ (2r,f)=1}} \frac{1}{f} \sum_{n \leq U} \frac{1}{n} \sum_{p \in S_{f,r}(t)} \left( \frac{d}{n} \right) \log p + O \left( \frac{\gamma}{\beta} x \log^2 x \left( \frac{x^{1/2}}{U} + \frac{1}{V^2} \right) \right),
\end{equation}
where we assume henceforth that $\log U \ll \log x$.  The sum over $f$ in \eqref{lisa} is evaluated by splitting the sum according to the residue class of $d$ modulo $4n$.  Since $d=(r^2-4p)/f^2$ is odd, and $\left( \frac{d}{n} \right)=0$ whenever $(d,n)>1$, we get
\begin{equation} \label{maggie}
 \sum_{\substack{f \leq V \\ (2r,f)=1}} \frac{1}{f} \sum_{n \leq U} \frac{1}{n} \sum_{p \in S_{f,r}(t)} \left( \frac{d}{n} \right) \log p = \sum_{\substack{n \leq U, f \leq V \\ (2r, f) =1}} \frac{1}{fn} \sum_{\substack{a \bmod{4n} \\ (a,4n)=1}} \left( \frac{a}{n} \right) \sum_{\substack{p \in S_{f,r}(t) \\ d \equiv a \bmod{4n}}} \log p.
\end{equation}
The two conditions in the inner-most of the above sums $p \in S_{f,r}(t)$ and $d=(r^2-4p)/f^2 \equiv a \pmod{4n}$ are equivalent to $(r/2\beta)^2 \leq p \leq t$ and $p \equiv (r^2-af^2)/4 \pmod{nf^2}$.  Moreover, since $(2r,f)=1$, $nf^2$ and $(r^2-af^2)/4$ are co-prime if and only if $(r^2-af^2,4n)=4$. \newline

We re-write \eqref{maggie} as
\begin{equation} \label{abe}
\begin{split}
& \sum_{\substack{n \leq U, f \leq V \\ (2r, f) =1}} \frac{1}{fn} \sum_{\substack{a \bmod{4n} \\ (a,4n)=1}} \left( \frac{a}{n} \right) \Theta\left(r^2/(2\beta)^2 , t-r^2/(2\beta)^2; nf^2, \frac{r^2-af^2}{4} \right) \\
&= \left( t-\frac{r^2}{2\beta^2} \right) \sum_{\substack{n \leq U, f \leq V \\ (2r, f) =1}} \frac{c_f^r(n)}{fn \varphi(nf^2)} + \sum_{\substack{n \leq U, f \leq V \\ (2r, f) =1}} \frac{1}{fn} \\
& \hspace*{.5in} \times \sum_{\substack{a \bmod{4n} \\ (a,4n)=1 \\ (r^2-af^2,4n)=4}} \left( \frac{a}{n} \right)  E\left(r^2/(2\beta)^2 , t-r^2/(2\beta)^2; nf^2, \frac{r^2-af^2}{4} \right),
\end{split}
\end{equation}
where $c_f^r(n)$, $\Theta(x,y;q,a)$ and $E(x,y;q,a)$ are as defined in
 \eqref{constantfrn} and \eqref{defpsi1}. \newline

We first deal with the case
\begin{equation} \label{milhouse}
 t- \left( \frac{r}{2 \beta} \right)^2 \geq \left( \frac{r}{2 \beta} \right)^{7/6} x^{\varepsilon}.
\end{equation}
In this case, applying Cauchy's inequality, we have that the second term in \eqref{abe} is
\begin{eqnarray*}
& \ll & \sum_{\substack{f \leq V \\ (2r,f)=1}} \frac{1}{f} \left( \sum_{n \leq U} \frac{\varphi(4n)}{n^2} \right)^{\frac{1}{2}} \left( \sum_{n \leq U} \sum_{\substack{a \bmod{4n} \\ (a,4n)=1 \\ (r^2-af^2,4n)=4}} E^2 \left( \frac{r^2}{(2\beta)^2} , t-\frac{r^2}{(2\beta)^2}; nf^2, \frac{r^2-af^2}{4} \right) \right)^{\frac{1}{2}} \\
& \ll & ( \log U)^{\frac{1}{2}} \sum_{\substack{f \leq V \\ (2r,f)=1}} \frac{1}{f} \left( \sum_{n \leq U} \sum_{\substack{b \bmod{nf^2} \\ (b,nf^2)=1}} E^2 \left( \frac{r^2}{(2\beta)^2} , t-\frac{r^2}{(2\beta)^2}; nf^2, b \right) \right)^{\frac{1}{2}},
\end{eqnarray*}
as $a_1 \not\equiv a_2 \pmod{4n}$ ensures that
\[ b_1 = (r^2-a_1f^2)/4 \not\equiv b_2=(r^2-a_2f^2)/4 \pmod{nf^2}. \]

The last sum above is majorized by
\[ \log V (\log U)^{\frac{1}{2}} \left( \sum_{n \leq UV^2} \sum_{\substack{a \bmod{n} \\ (a,n)=1}} E^2 \left(\frac{r^2}{(2\beta)^2} , t-\frac{r^2}{(2\beta)^2}; n, a \right) \right)^{\frac{1}{2}}. \]
Fix any $c>0$.  Because of the condition in \eqref{milhouse}, we may apply Lemma \ref{BDVlemma} to the double sum above and it is bounded by
\begin{equation} \label{nelson}
 \ll \frac{x \gamma}{\beta \log^c x}
\end{equation}
if
\begin{equation} \label{martin}
 \log U \ll \log x, \; \log V \ll \log x, \; r \leq 2 \sqrt{x} \alpha \; \mbox{and} \; UV^2 \leq \frac{x \gamma}{\beta (\log x)^{5+2c}}.
\end{equation}
Here we have again used \eqref{dist}. \newline

If \eqref{milhouse} is not satisfied, then the expression of interest satisfies the same majorant given in \eqref{nelson} by a trivial bound for
\[ E^2 \left( r^2/(2\beta)^2 , t-r^2/(2\beta)^2; nf^2, \frac{r^2-af^2}{4} \right), \]
where we take into account the estimate (\ref{dist}) and the conditions
$\gamma/\beta \le x^{-\varepsilon}$ and
\[ \frac{x^{2\varepsilon}\alpha \beta^{6/5}}{\gamma^{6/5}}<r\le
2\sqrt{x}\alpha. \]
We now set, assuming $c>1$,
\[ U = x^{1/2} \log^{c+2} x, \; V = \log^c x. \]
Note that these choices for $U$ and $V$ are consistent with the conditions in \eqref{martin}, since we assume that
\[ \frac{\gamma}{\beta} \geq x^{-1/2+\varepsilon}. \]
Combining everything and using Lemma \ref{maintermlemma}, the second double sum on the right-hand side of \eqref{Marge} can be expressed in the following way.
\[
\sum_{f \leq 2 \sqrt{x}} \frac{1}{f} \sum_{p \in S_{f,r}(t)} L(1, \chi_d) \log p = \left( t- \frac{r^2}{2\beta^2} \right) K_r + O \left( \frac{x \gamma}{\beta \log^c x} \right).
\]
Therefore, the left-hand side of \eqref{Marge} is
\begin{equation} \label{theend}
=  \frac{\pi K_rrF(\alpha,\beta)}{\alpha^2}\left(1+O\left(
x^{-\varepsilon}\right)\right)+O\left(\frac{xF(\alpha,\beta)}{r\log^c x}
\right),
\end{equation}
where for the error term estimate we have used
\[ \gamma \sqrt{1-\alpha^2} \ll F(\alpha, \beta), \]
and for the main term we have applied integration by parts, the change of variables
$v^2=r^2/4t$ and
\[ \frac{r}{v^2} = \frac{r}{\alpha^2} \left( 1 + O(x^{-\varepsilon}) \right), \; \mbox{for} \; \alpha \leq v \leq \beta, \]
which follows from \eqref{dist} and $\gamma/\beta \leq x^{-\varepsilon}$.  Summing up \eqref{theend} over $r$ in the interval
$x^{2\varepsilon}\alpha\beta^{6/5}/ \gamma^{6/5} < r \le 2\sqrt{x}\alpha$,
using Lemma \ref{LTconstantlemma}
and partial summation, and taking into account
the conditions $\gamma/\beta\ge
x^{2\varepsilon-5/12}$ and $\alpha\ge x^{-1/2+\varepsilon}$,
\eqref{Burns} and hence $S_2$ are equal to
\begin{equation} \label{seconddoublesum}
xF(\alpha,\beta)\left(1+\frac{1}{\log^{c-1} x}\right).
\end{equation}

It remains to show that $S_1$ and $S_3$ are small comparing to $S_2$.  By Lemma \ref{Hlemma} and the well-known estimate $L(1,\chi_d)\ll \log 2|d|$, we have
\begin{equation}\label{Heq}
H(r^2-4p)\ll \sqrt{|r^2-4p|}\log^2 x
\end{equation}
from which we deduce, by a short calculation, that $S_1$ and $S_3$ are majorized by
\begin{equation} \label{firstds}
\ll x^{1-\varepsilon}F(\alpha,\beta).
\end{equation}
Here we have used the condition $\gamma/\beta\ge x^{2\varepsilon-5/12}$ for the estimation of $S_1$ and the condition $\gamma/\beta\le x^{-\varepsilon}$ for the estimation of $S_3$.  Now combining \eqref{Homer}, \eqref{seconddoublesum} and \eqref{firstds}, we obtain the desired result.
\end{proof}

\section{Preparations for the estimation of the error term}
We first characterize the elliptic curves lying in a fixed $\mathbb{F}_p$-isomorphism class, where $p$ is a prime that is neither 2 nor 3.  In the following, for $z\in \mathbb{Z}$ let $\overline{z}$ be the reduction of $z$ modulo $p$. Furthermore, let $z^{-1}$ be a multiplicative inverse modulo $p$, that is, $z z^{-1}\equiv 1 \pmod{p}$. \\

\begin{lemma} \label{charlemma}
Let $a,b,c,d\in \mathbb{Z}$, $p\nmid abcd$ and $E_1$,
$E_2$ be
elliptic curves over $\mathbb{F}_p$ given by
$$
E_1\ :\ Y^2=X^3+\overline{a}X+\overline{b} \; \mbox{and} \;
E_2\ :\ Y^2=X^3+\overline{c}X+\overline{d}.
$$

{\bf (i)} If $p\equiv 1 \pmod{4}$, then $E_1$ and $E_2$ are $\mathbb{F}_p$-isomorphic if and only if $ca^{-1}$ is a biquadratic residue modulo $p$ and $c^3a^{-3}\equiv d^2b^{-2} \pmod{p}$.\medskip

{\bf (ii):} If $p\equiv 3 \pmod{4}$, then $E_1$ and $E_2$ are $\mathbb{F}_p$-isomorphic if and only if $ca^{-1}$ and $db^{-1}$ are quadratic residues modulo $p$ and $c^3a^{-3}\equiv d^2b^{-2} \pmod{p}$.
\end{lemma}
\begin{proof} By Lemma \ref{LE2}, the curves $E_1$ and $E_2$ are $\mathbb{F}_p$-isomorphic if and only if there exists an integer $m$ such that $p\nmid m$ and
\begin{equation} \label{bed}
c\equiv m^4a \pmod{p} \ \ \ \ \mbox{and } \ \ \ d\equiv m^6b \pmod{p}.
\end{equation}

{\bf (i)} Suppose that $p\equiv 1 \pmod{4}$.  If \eqref{bed} is satisfied, then it follows that $ca^{-1}$ is a biquadratic residue modulo $p$ and $c^3a^{-3}\equiv m^{12}\equiv d^2b^{-2} \pmod{p}$. \newline

Assume, conversely, that  $ca^{-1}$ is a biquadratic residue modulo $p$ and
\begin{equation} \label{congru}
c^3a^{-3}\equiv d^2b^{-2} \pmod{p}.
\end{equation}

Since $p\equiv 1 \pmod{4}$, there exist two solutions $m_1,m_2$ of the congruence $c\equiv m^4a \pmod{p}$ such that $m_2^2\equiv -m_1^2 \pmod{p}$, and \eqref{congru} implies that $d^2b^{-2}\equiv m_j^{12} \pmod{p}$ for $j=1,2$. From this it follows that $db^{-1}\equiv m_1^6 \pmod{p}$ or $db^{-1}\equiv -m_1^6\equiv
m_2^6 \pmod{p}$.  Hence, the system \eqref{bed} is solvable for $m$. This completes the proof of {\bf (i)}.
\medskip

{\bf (ii)} Suppose that $p\equiv 3 \pmod{4}$.  If (\ref{bed}) is satisfied, then it follows that $ca^{-1}$ and $db^{-1}$ are quadratic residues modulo $p$ and $c^3a^{-3}\equiv m^{12}\equiv d^2b^{-2} \pmod{p}$. \newline

Assume, conversely, that $ca^{-1}$ and $db^{-1}$ are quadratic residues modulo $p$ and (\ref{congru}) is satisfied. Then,since $p\equiv 3 \pmod{4}$, $ca^{-1}$ is also a biqadratic residue.  Hence, there exists a solution $m$ of the congruence $c\equiv m^4a \pmod{p}$. Further, \eqref{congru} implies that $d^2b^{-2}\equiv m^{12} \pmod{p}$. From this it follows that $db^{-1}\equiv m^6 \pmod{p}$ or $db^{-1}\equiv -m^6 \pmod{p}$. But $-m^6$ is a quadratic non-residue modulo $p$ since $p\equiv 3 \pmod{4}$. Thus $db^{-1}\not\equiv -m^6 \pmod{p}$ since $db^{-1}$ is supposed to be a quadratic residue modulo $p$. Hence, we have $db^{-1}\equiv m^6 \pmod{p}$, and so the system \eqref{bed} is solvable for $m$. This completes the proof of {\bf (ii)}. \end{proof}

We shall detect elliptic curves lying in a fixed $\mathbb{F}_p$-isomorphism class by using Dirichlet characters. For the estimation of certain error terms we then need the following results on character sums.

\begin{lemma} \label{Dirlemma}
Let $q,N\in \mathbbm{N}$ and $(a_n)$ be any sequence of complex numbers. Then
$$
\sum\limits_{\chi\ \! \bmod{q}} \left| \sum\limits_{n\le N} a_n\chi(n) \right|^2
=\varphi(q)\sum\limits_{\substack{a=1\\ (a,q)=1}}^{q} \left| \sum\limits_{\substack{n\le N\\ n\equiv a\ \!\bmod{q}}} a_n\right|^2,
$$
where the outer
sum on the left-hand side runs over all Dirichlet characters modulo $q$.
\end{lemma}
\begin{proof} This is a consequence of the orthogonality relations for
Dirichlet characters. \end{proof}

\begin{lemma}\label{fourthmomentlemma}
Let $q,N\in \mathbbm{N}$, $q\ge 2$. Then
$$
\sum\limits_{\chi\not=\chi_0} \left| \sum\limits_{n\le N} \chi(n) \right|^4
\ll N^2q\log^6 q,
$$
where the outer sum on the left-hand side runs over all non-principal
Dirichlet characters
modulo $q$.
\end{lemma}
\begin{proof} This is Lemma 3 in \cite{FrIw}. \end{proof}

Furthermore, we shall need the following estimates for sums over
$H_{r,p}$.\\

\begin{lemma} \label{HPlemma} Suppose that $0<\alpha\le \beta\le 1$,
$x\ge 1$ and $F(\alpha,\beta)\ge x^{-1/2}$, where $F(\alpha,\beta)$ is
defined as in \eqref{Fdef}. Let
$$
H_p:=\sum\limits_{2\sqrt{p}\alpha\le r \le 2\sqrt{p}\beta}
H(r^2-4p).
$$
Then
$$
\sum\limits_{p\le x} H_{p}^{1/2}\ll x^{3/2+\varepsilon}F(\alpha,\beta)^{1/2},
\ \ \ \ \ \
\sum\limits_{p\le x} \frac{H_{p}}{\sqrt{p}}\ll
x^{3/2+\varepsilon}F(\alpha,\beta),
$$
and
$$
\sum\limits_{p\le x} \frac{H_{p}}{p}\ll x^{1+\varepsilon}F(\alpha,\beta),
 \ \ \ \ \ \ \sum\limits_{p\le x} \frac{H_{p}\log p}{p^2}\ll 1.
$$
\end{lemma}

\begin{proof} By Lemma \ref{Hlemma}, we have
\begin{equation} \label{convert}
H_p
=\sum\limits_{2\sqrt{p}\alpha\le r \le 2\sqrt{p}\beta}
\frac{1}{\pi}\sum\limits_{\substack{f,d\\ r^2-4p=df^2\\ d\equiv 0,1\
\bmod{4}}} \sqrt{|d|}L(1,\chi_d).
\end{equation}
It is well-known that $L(1,\chi_d)\ll \log 2|d|$ and that the number of divisors $\tau(n)$ of a natural number $n$ satisfies $\tau(n)\ll n^{\varepsilon}$ . Therefore, from \eqref{convert} it follows that
\begin{equation} \label{Hest}
H_p \ll \sum\limits_{2\sqrt{p}\alpha\le r \le 2\sqrt{p}\beta} (4p-r^2)^{1/2+\varepsilon} \ll p^{1/2+\varepsilon} \sum\limits_{2\sqrt{p}\alpha\le r \le 2\sqrt{p}\beta} \sqrt{1-\left(\frac{r}{2\sqrt{p}}\right)^2} \ll p^{1/2+\varepsilon} \left(1+\sqrt{p}F(\alpha,\beta)\right).
\end{equation}
From \eqref{Hest}, we obtain
\begin{equation}\label{HE}
\sum\limits_{p\le x} H_{p} \ll x^{2+\varepsilon}F(\alpha,\beta)
\end{equation}
if $F(\alpha,\beta)\ge x^{-1/2}$.
Using the Cauchy-Schwarz inequality, we obtain
$$
\sum\limits_{p\le x} H_{p}^{1/2}\ll
x^{1/2}\left(\sum\limits_{p\le x} H_{p}\right)^{1/2}\ll  x^{3/2+\varepsilon}
F(\alpha,\beta)^{1/2}
$$
from \eqref{HE}. The remaining three estimates in Lemma 13 can be derived from \eqref{HE} by partial summation.
\end{proof}

Finally, we shall need the following bound.

\begin{lemma} \label{numb}
The number of $\mathbb{F}_p$-isomorphism classes of elliptic curves
containing curves
$$
E\ :\ Y^2=X^3+aX+b
$$
over $\mathbb{F}_p$  with $a=0$ or $b=0$ is bounded by 10.
\end{lemma}

\begin{proof} By  Lemma 2, the number of $\mathbb{F}_p$-isomorphism classes containing curves $E(0,b)$ with $b\in \mathbb{F}_p^* $ is less than 6, and the number of $\mathbb{F}_p$-isomorphism classes containing curves $E(a,0)$ with $a\in \mathbb{F}_p^*$ does not exceed 4. \end{proof}

\section{Estimation of the error term}
Now we evaluate the error term more explicitly than in \eqref{DaPa}. We shall
establish the following.
\begin{theorem} \label{errortermtheorem}
Let $A,B,x\ge 1$ and $0<\alpha\le \beta\le 1$ Suppose that
$F(\alpha,\beta)\ge x^{-1/2}$, where $F(\alpha,\beta)$ is
defined as in \eqref{Fdef}. Then
\begin{equation*}
\begin{split}
\frac{1}{4AB}\sum\limits_{|a|\le A} &\sum\limits_{|b|\le B}
\Theta_{E(a,b)}(\alpha,\beta;x) -
\sum\limits_{p\le x}\log p \sum\limits_{2\sqrt{p}\alpha\le
r\le 2\sqrt{p}\beta} \frac{H(r^2-4p)}{2p}\\
&\ll x^{3/2+\varepsilon}\left(F(\alpha,\beta)
\left(A^{-1}+B^{-1}\right)+ F(\alpha,\beta)^{1/2}(AB)^{-1/2}\right).
\end{split}
\end{equation*}
\end{theorem}

\begin{proof}
For $p>3$ let $I_{p}$ be the number of $\mathbb{F}_p$-isomorphism classes of elliptic curves
$$
E\ :\ Y^2=X^3+cX+d
$$
over $\mathbb{F}_p$ with $2\sqrt{p}\alpha\le \lambda_E(p)\le 2\sqrt{p}\beta$ points
such that $c,d\not=0$. Let $(u_{p,j},v_{p,j})$, $j=1,...,I_{p}$ be pairs of
integers such that the curves $E(\overline{u_{p,j}},\overline{v_{p,j}})$
form a
system of representatives of these isomorphism classes.
We now write
\begin{eqnarray*}
& & \sharp\{|a|\le A,\ |b|\le B\ :\ 2\sqrt{p}\alpha\le
\lambda_{E(a,b)}(p)\le 2\sqrt{p}\beta\}\\  &=&
\sharp\{|a|\le A,\ |b|\le B\ :\ p \nmid ab,\  2\sqrt{p}\alpha\le
\lambda_{E(a,b)}(p)\le 2\sqrt{p}\beta\} + O\left(\frac{AB}{p}+A+B\right)\nonumber
\end{eqnarray*}
and
\begin{equation}\label{otto}
\sharp\{|a|\le A, \ |b|\le B\ :\ p\nmid ab,\  2\sqrt{p}\alpha\le \lambda_{E(a,b)}(p)\le 2\sqrt{p}\beta\}
= \sum\limits_{j=1}^{I_p} \sharp\{|a|\le A,\ |b|\le B\ : E(\overline{a},\overline{b})\cong
E(\overline{u_{p,j}},\overline{v_{p,j}})\},
\end{equation}
where  the symbol $\cong$ stands for ``$\mathbb{F}_p$-isomorphic''.  We rewrite the term on the right-hand  side of (\ref{otto}) as a character sum.  If $p\equiv 1 \pmod{4}$, then, by Lemma~\ref{charlemma} (i) and the character relations,
this term equals
\begin{equation} \label{character}
\frac{1}{4\varphi(p)}\sum\limits_{j=1}^{I_{p}}
\sum\limits_{|a|\le A} \sum\limits_{|b|\le B} \sum\limits_{k=1}^4
\left(\frac{au_{p,j}^{-1}}{p}\right)_4^k \
\sum\limits_{\chi\ \! \bmod{p}}
\chi(a^3u_{p,j}^{-3}b^{-2}v_{p,j}^2),
\end{equation}
where $(\cdot/p)_4$ is the biquadratic residue symbol.  If $p\equiv 3 \pmod{4}$, then, by Lemma~\ref{charlemma} (ii) and the character relations, the term on the right-hand  side of \eqref{otto} equals
\[ \frac{1}{4\varphi(p)}\sum\limits_{j=1}^{I_{p}}
\sum\limits_{|a|\le A} \sum\limits_{|b|\le B} \left(\chi_0(a)+
\left(\frac{au_{p,j}^{-1}}{p}\right)\right)
\left(\chi_0(b)+
\left(\frac{bv_{p,j}^{-1}}{p}\right)\right) \sum\limits_{\chi\ \! \bmod{p}}
\chi(a^3u_{p,j}^{-3}b^{-2}v_{p,j}^2), \]
where $(\cdot/p)$ is the Legendre symbol and $\chi_0$ is the principal character.\newline

In the following, we consider only the case $p\equiv 1 \pmod{4}$. The case $p\equiv 3 \pmod{4}$ can be treated in a similar way.  The expression in \eqref{character} equals
$$
\frac{1}{4\varphi(p)} \sum\limits_{k=1}^4 \sum\limits_{\chi\ \! \bmod{p}} \sum\limits_{j=1}^{I_{p}} \left(\frac{u_{p,j}}{p}\right)_4^{-k} \overline{\chi}^3(u_{p,j}) \chi^2(v_{p,j}) \sum\limits_{|a|\le A}\left(\frac{a}{p}\right)_4^{k}\chi^3(a) \sum\limits_{|b|\le B}  \overline{\chi}^2(b).
$$
We split this expression into 3 parts $M,E_1,E_2$, where\\ \\
({\bf i}) $M=$ contribution of $k,\chi$ with
$(\cdot/p)_4^{k} \chi^3=\chi_0$,
$\chi^2=\chi_0$;\\ \\
({\bf ii}) $E_1=$ contribution of $k,\chi$ with
$(\cdot/p)_4^{k} \chi^3\not=\chi_0$,
$\chi^2=\chi_0$ or

\ $(\cdot/p)_4^{k} \chi^3=\chi_0$,
$\chi^2\not=\chi_0$;\\ \\
({\bf iii}) $E_2=$ contribution of $k,\chi$ with
$(\cdot/p)_4^{k} \chi^3\not=\chi_0$, $\chi^2\not=\chi_0$.\\ \\
As one may expect, $M$ shall turn out to be the main term and $E_1$, $E_2$
to be the error terms.\\

{\it Estimation of $M$.}\ \ \ \
The only cases in which
$(\cdot/p)_4^{k} \chi^3=\chi_0 \mbox{ and } \chi^2=\chi_0$ are
$k=0$, $\chi=\chi_0$ and $k=2$, $\chi=(\cdot/p)$. Now, by a short calculation,
we obtain
\begin{equation} \label{S1}
M=\frac{4ABI_{p}}{2p}\left(1+O\left(\frac{1}{p}\right)\right).
\end{equation}
By Lemma \ref{numb}, we have
$$
\sum\limits_{2\sqrt{p}\alpha\le r \le 2\sqrt{p}\beta}
H(r^2-4p)-I_{p}\le 10.
$$
Combining this with \eqref{S1}, we obtain
$$
M=\sum\limits_{2\sqrt{p}\alpha\le r\le 2\sqrt{p}\beta}
\frac{4ABH(r^2-4p)}{2p}+ O\left(\frac{AB}{p}+\frac{ABI_{p}}{p^2}\right).
$$\medskip

{\it Estimation of $E_1$.}\ \ \ \ The number of solutions $(k,\chi)$ with $k=1,...,4$ of $(\cdot/p)_4^{k} \chi^3=\chi_0$ is bounded by 12, and $\chi^2=\chi_0$ has precisely 2 solutions $\chi$.  Thus $E_1$ is the sum of at most $12+4\times 2=20$ terms of the form
$$
\frac{1}{4\varphi(p)} \sum\limits_{j=1}^{I_{p}}
\overline{\chi_1}(u_{p,j})\overline{\chi_2}(v_{p,j})
\sum\limits_{|a|\le A} \chi_1(a) \sum\limits_{|b|\le B} \chi_2(b),
$$
where exactly one of the characters $\chi_1$, $\chi_2$ is the principal character $\chi_0$. Therefore, Lemma~\ref{PolyaVinolemma} implies that
$$
E_1\ll \frac{I_{p}(A+B)}{\sqrt{p}}\log p.
$$

{\it Estimation of $E_2$.}\ \ \ \  Given $k\in \mathbb{Z}$ and a character $\chi_1 \pmod{p}$, the number of solutions $\chi$ of $\left(\frac{\cdot}{p}\right)_4^{k} {\chi}^{-3}=\chi_1$ is less than 3, and the number of solutions $\chi$ of $\chi^2=\chi_1$ is $\le 2$.  Thus, using the Cauchy-Schwarz inequality, we deduce that
\begin{equation} \label{cha}
E_2 \ll \frac{1}{p} \sum\limits_{k=1}^4 \left( \sum\limits_{\chi} \left|\sum\limits_{j=1}^{I_{p}} \left(\frac{u_{p,j}}{p}\right)_4^{k} \chi(u_{p,j}^{-3}v_{p,j}^2) \right|^2 \right)^{1/2} \left(\sum\limits_{\chi\not=\chi_0} \left| \sum\limits_{|a|\le A} \chi(a) \right|^4\right)^{1/4} \left(\sum\limits_{\chi\not=\chi_0} \left| \sum\limits_{|b|\le B}  \chi(b)\right|^4\right)^{1/4}.
\end{equation}
By Lemma~\ref{charlemma} (i), the number of $j$'s such that $u_{p,j}^{-3}v_{p,j}^2$ lie in a fixed residue class modulo $p$ is bounded by 4.  Using this, Lemma~\ref{Dirlemma} and Lemma~\ref{fourthmomentlemma}, the expression on the right-hand side of \eqref{cha} is dominated by
$$
\ll (I_{p}AB)^{1/2}\log^3 p.
$$

{\it The final estimate.} Combining all contributions, we obtain
\begin{equation} \label{end}
\begin{split}
& \sharp\{|a|\le A, \ |b|\le B\ :\ 2\sqrt{p}\alpha\le
\lambda_{E(a,b)}(p)\le 2\sqrt{p}\beta\} \\
&= \sum\limits_{2\sqrt{p}\alpha\le r\le 2\sqrt{p}\beta}
\frac{4ABH(r^2-4p)}{2p} +
O\left(\frac{AB}{p}+ \frac{ABI_{p}}{p^2}+A+B+
\left(I_{p}AB\right)^{\frac{1}{2}}\log^3 p+ \frac{I_{p}(A+B)}{\sqrt{p}}\log p\right).
\end{split}
\end{equation}
The result of Theorem~\ref{TH1} now follows from \eqref{goal}, \eqref{end}, Lemma \ref{HPlemma}, $I_p\le H_p$ and the prime number theorem which says that $\pi(x)\sim x/\log x$ as $x\rightarrow \infty$. \end{proof}

Combining Theorem \ref{maintermtheorem} and Theorem \ref{errortermtheorem},
we obtain Theorem \ref{TH1}. Note that the condition
$\alpha\ge x^{-1/2+\varepsilon}$ in Theorem
\ref{maintermtheorem} can be dropped if we
assume the conditions
$x^{\varepsilon-5/12}\le \gamma/\beta \le x^{-\varepsilon}$ and $F(\alpha,
\beta)\ge x^{-1/2+\varepsilon}$ in Theorem \ref{TH1}.

\section{Proof of Theorem 2}
We set
$$
\mu:=\frac{1}{4AB}\sum\limits_{|a|\le A} \sum\limits_{|b|\le B}
\Theta_{E(a,b)}(\alpha,\beta;x).
$$
Fix any $c>0$ and assume that $A,B>x^{1/2+\varepsilon}$ and
$AB>x^{1+\varepsilon}/F(\alpha,\beta)$. Then, by Corollary 1,
we have
\begin{equation}\label{mu}
\mu = xF(\alpha,\beta)+O\left(x\frac{F(\alpha,\beta)}{\log^c x}\right).
\end{equation}
Thus, by the triangle inequality, the left-hand side of (\ref{T3}) is
\begin{equation} \label{start}
\begin{split}
& \ll \frac{1}{4AB}\left|\sum\limits_{|a|\le A} \sum\limits_{|b|\le B}
\Theta_{E(a,b)}(\alpha,\beta;x)
-\mu\right|^2+O\left(\frac{x^2F(\alpha,\beta)^2}{\log^{2c} x}\right)\\
&= \frac{1}{4AB}\sum\limits_{|a|\le A} \sum\limits_{|b|\le B}
\Theta_{E(a,b)}(\alpha,\beta;x)^2
-\mu^2+O\left(\frac{x^2F(\alpha,\beta)^2}{\log^{2c} x}\right),
\end{split}
\end{equation}
where the second line arises from the general identity
$$
\frac{1}{N}\sum\limits_{n=1}^N \left(a_n-\mu\right)^2=
\frac{1}{N}\sum\limits_{n=1}^N a_n^2-\mu^2\ \ \ \ \ \mbox{ if }\ \ \ \ \
\mu=\frac{1}{N} \sum\limits_{n=1}^N a_n.
$$
We now write
\begin{equation} \label{goal2}
\sum\limits_{|a|\le A} \sum\limits_{|b|\le B} \Theta_{E(a,b)}(\alpha,\beta;x)^2=
4AB\mu + \sum\limits_{\substack{p,q\le  x\\ p\not= q}} \log p \log q \mathop{\sum \sum}_{\substack{|a|\le A,\ |b|\le B \\ 2\sqrt{p}\alpha\le \lambda_{E(a,b)}(p)\le 2\sqrt{p}\beta \\  2\sqrt{q}\alpha\le \lambda_{E(a,b)}(q)\le 2\sqrt{q}\beta }} 1,
\end{equation}
where $p,q$ denote primes.  Obviously,
\begin{equation} \label{app}
\begin{split}
\sum\limits_{\substack{p,q\le  x\\ p\not= q}} & \log p\log q \mathop{\sum \sum}_{\substack{|a|\le A,\ |b|\le B \\ 2\sqrt{p}\alpha\le \lambda_{E(a,b)}(p)\le 2\sqrt{p}\beta \\  2\sqrt{q}\alpha\le \lambda_{E(a,b)}(q)\le 2\sqrt{q}\beta }} 1 \\
&= \sum\limits_{\substack{p,q\le  x\\ p\not= q}} \log p \log q
\mathop{\sum \sum}_{\substack{|a|\le A,\ |b|\le B,\ p, q \nmid ab \\ 2\sqrt{p}\alpha\le \lambda_{E(a,b)}(p)\le 2\sqrt{p}\beta \\  2\sqrt{q}\alpha\le \lambda_{E(a,b)}(q)\le 2\sqrt{q}\beta }} 1 +O\left( \sum\limits_{p\le x} \ \sum\limits_{\substack{|a|\le A,\ \! |b|\le B\\
p|ab}} \Theta_{E(a,b)}(\alpha,\beta;x)\right).
\end{split}
\end{equation}
Using Corollary 1 and $\sharp\{p\ :\ p|ab\}=\omega(|ab|)\ll \log\log(10|ab|)$
if $ab\not=0$, we have
\begin{equation} \label{app1}
\sum\limits_{p\le x} \ \sum\limits_{\substack{|a|\le A,\ \! |b|\le B\\p|ab}} \Theta_{E(a,b)}(\alpha,\beta;x) + O\left(xABF(\alpha,\beta)\log\log(10AB) +x^2(A+B)\right).
\end{equation}

Now we fix $p,q$ with $p\not=q$.
In the following, we confine ourselves to the case when $p\equiv q\equiv 1 \pmod{4}$. The remaining cases $pq\equiv -1 \pmod{4}$ and $p\equiv q\equiv 3 \pmod{4}$ can be treated in a similar way.
Similarly as in section 6, we can express the term
\[ \mathop{\sum \sum}_{\substack{|a|\le A,\ |b|\le B,\ p, q \nmid ab \\ 2\sqrt{p}\alpha\le \lambda_{E(a,b)}(p)\le 2\sqrt{p}\beta \\  2\sqrt{q}\alpha\le \lambda_{E(a,b)}(q)\le 2\sqrt{q}\beta }} 1 \]
as a character sum
\[ \frac{1}{16\varphi(p)\varphi(q)}
\sum\limits_{i=1}^{I_{p}}\sum\limits_{j=1}^{I_{q}}
\sum\limits_{|a|\le A} \sum\limits_{|b|\le B} \sum\limits_{k=1}^4
\left(\frac{au_{p,i}^{-1}}{p}\right)_4^k\
\sum\limits_{\chi\ \! \bmod{p}}
\chi(a^3u_{p,i}^{-3}b^{-2}v_{p,i}^2) \sum\limits_{l=1}^4
\left(\frac{au_{q,j}^{-1}}{q}\right)_4^l\
\sum\limits_{\chi'\ \! \bmod{q}}
\chi'(a^3u_{q,j}^{-3}b^{-2}v_{q,j}^2).\]
This sum equals
\begin{equation} \label{character3}
\begin{split}
& \frac{1}{16\varphi(p)\varphi(q)}\sum\limits_{k=1}^4 \sum\limits_{l=1}^4
\ \sum\limits_{\chi\ \! \bmod{p}}\
\sum\limits_{\chi'\ \! \bmod{q}}
\left(\sum\limits_{i=1}^{I_{p}}
\left(\frac{u_{p,i}}{p}\right)_4^{-k}
{\overline\chi}^3(u_{p,i})\chi^2(v_{p,i})\right) \\
& \times \left(\sum\limits_{j=1}^{I_{q}}
\left(\frac{u_{q,j}}{q}\right)_4^{-l}
\overline{\chi'}^3(u_{q,j}){\chi'}^2(v_{q,j})\right)
\left(\sum\limits_{|a|\le A}
\left(\frac{a}{p}\right)_4^k\left(\frac{a}{q}\right)_4^l
\left(\chi{\chi'}\right)^3(a)\right) \left(\sum\limits_{|b|\le B}
\left(\overline{\chi\chi'}\right)^2(b)\right).
\end{split}
\end{equation}
Let $\chi_0$ be the principal character modulo $p$ and
$\chi'_0$ be the principal character modulo $q$. Then $\chi_0\chi'_0$ is
the principal character modulo $pq$. As in section 6, we split the
expression in (\ref{character3}) into 3 parts $M,E_1,E_2$, where\\ \\
({\bf i}) $M=$ contribution of $k,l,\chi,\chi'$ with

\[ (\cdot/p)_4^{k} (\cdot/q)_4^{l}(\chi\chi')^3=\chi_0\chi'_0, (\chi\chi')^2=\chi_0\chi'_0; \]
({\bf ii}) $E_1=$ contribution of $k,l,\chi,\chi'$ with

\[ (\cdot/p)_4^{k} (\cdot/q)_4^{l}(\chi\chi')^3\not=\chi_0\chi'_0, (\chi\chi')^2=\chi_0\chi'_0 \; \mbox{or} (\cdot/p)_4^{k} (\cdot/q)_4^{l}(\chi\chi')^3=\chi_0\chi'_0, (\chi\chi')^2\not=\chi_0\chi'_0; \]
({\bf iii}) $E_2=$ contribution of $k,l,\chi,\chi'$ with

\[ (\cdot/p)_4^{k}(\cdot/q)_4^{l}(\chi\chi')^3\not=\chi_0\chi'_0, (\chi\chi')^2\not=\chi_0\chi'_0. \]
\\

{\it Estimation of $M$.}\ \ \ \
The only cases in which
$(\cdot/p)_4^{k} (\cdot/q)_4^{l}(\chi\chi')^3=\chi_0\chi'_0$,
$(\chi\chi')^2=\chi_0\chi'_0$ are:\medskip\\
(a) $k=l=0$, $\chi=\chi_0$, $\chi'=\chi'_0$; \medskip\\
(b) $k=l=2$, $\chi=(\cdot/p)$, $\chi'=(\cdot/q)$;\medskip\\
(c) $k=0$, $l=2$, $\chi=\chi_0$, $\chi'=(\cdot/q)$;\medskip\\
(d) $k=2$, $l=0$, $\chi=(\cdot/p)$, $\chi'=\chi_0$.\medskip\\
Now, by a short calculation, we obtain
\begin{equation} \label{S2}
M=\frac{4ABI_{p}I_{q}}{4pq}\left(1+O\left(\frac{1}{p}+\frac{1}{q}\right)
\right).
\end{equation}
By Lemma \ref{numb}, we have
$$
\sum\limits_{2\sqrt{p}\alpha\le r \le 2\sqrt{p}\beta}
H(r^2-4p)-I_{p}\le 10 \ \ \ \ \ \ \mbox{and} \ \ \ \ \ \
\sum\limits_{2\sqrt{q}\alpha\le r \le 2\sqrt{q}\beta}
H(r^2-4q)-I_{q}\le 10.
$$
Combining this with (\ref{S2}), we obtain
\[ M=4AB\sum\limits_{2\sqrt{p}\alpha\le r \le 2\sqrt{p}\beta}
\frac{H(r^2-4p)}{2p}\sum\limits_{2\sqrt{q}\alpha\le r \le 2\sqrt{q}\beta}
\frac{H(r^2-4q)}{2q} +O\left(\frac{AB(I_{p}+I_{q})}{pq}
+ABI_{p}I_{q}\left(\frac{1}{p^2q}+\frac{1}{pq^2}\right)\right). \]

{\it Estimation of $E_1$.}\ \ \ \ The number of solutions
$(k,l,\chi,\chi')$ with
$k,l=1,...,4$ of
$(\cdot/p)_4^{k} (\cdot/q)_4^{l}(\chi\chi')^3\not=\chi_0\chi'_0$
is bounded by $12^2$, and $(\chi\chi')^2=\chi_0\chi_0'$
has precisely 4 solutions $(\chi,\chi')$.
Thus $E_1$ is the sum of at most $144+16\cdot 4=228$
terms of the form
$$
\frac{1}{16\varphi(p)\varphi(q)} \sum\limits_{|a|\le A} \chi_1(a)
\sum\limits_{|b|\le B} \chi_2(b)\sum\limits_{i=1}^{I_{p}}
\chi_3(u_{p,i})\chi_4(v_{p,i}) \sum\limits_{j=1}^{I_{q}}
\chi'_3(u_{q,j})\chi'_4(v_{q,j}),
$$
where $\chi_1$, $\chi_2$ are characters modulo $pq$ such that exactly one of them
is the principal character, $\chi_3$, $\chi_4$ are characters modulo $p$, and
$\chi'_3$, $\chi'_4$ are characters modulo $q$. Here the characters
$\chi_{3,4}$, $\chi'_{3,4}$
depend on the characters $\chi_{1,2}$. Now Lemma~\ref{PolyaVinolemma} implies that
$$
E_1\ll \frac{I_{p}I_{q}(A+B)}{\sqrt{pq}}\log pq.
$$

{\it Estimation of $E_2$.}\ \ \ \  Given $k,l\in \mathbb{Z}$ and a character
$\chi_1$ modulo $pq$,
the number of characters $\chi$ modulo $pq$ such that
$(\cdot/p)_4^{k} (\cdot/q)_4^{l}(\chi\chi')^3=\chi_1$
is $\le 9$, and the number of $\chi$ modulo $pq$ such that
$\chi^2=\chi_1$ is $\le 4$.
Thus, using the Cauchy-Schwarz inequality,
we deduce that
\begin{equation} \label{cha2}
\begin{split}
E_2 &\ll \frac{1}{pq} \sum\limits_{k=1}^4 \sum\limits_{l=1}^4 \left(
\sum\limits_{\chi} \left|\sum\limits_{i=1}^{I_{p}} \left(\frac{u_{p,i}}{p}\right)_4^{k} \chi(u_{p,i}^{-3}v_{p,i}^2)
\right|^2 \right)^{\frac{1}{2}} \\
& \hspace*{.25in}\times \left(\sum\limits_{\chi'} \left|\sum\limits_{j=1}^{I_{q}}
\left(\frac{u_{q,j}}{q}\right)_4^{l} \chi'(u_{q,j}^{-3}v_{q,j}^2)
\right|^2 \right)^{\frac{1}{2}}
\left(\sum\limits_{\chi_1\not= \chi_0\chi'_0}
\left| \sum\limits_{|a|\le A} \chi_1(a)
\right|^4\right)^{\frac{1}{4}} \left(\sum\limits_{\chi_2\not=\chi_0\chi'_0}
\left|\sum\limits_{|b|\le B}  \chi(b)\right|^4\right)^{1/4},
\end{split}
\end{equation}
where $\chi$ runs over all characters modulo $p$, $\chi'$ runs over all
characters modulo $q$, and $\chi_1,\chi_2$ run over all non-principal
characters modulo $pq$. \newline

By Lemma~\ref{charlemma} (i), the number of $i$'s such that
$u_{p,i}^{-3}v_{p,i}^2$ lie in a fixed residue class modulo $p$ is bounded by 4.
The same is true for the number of $j's$ such that
$u_{q,j}^{-3}v_{q,j}^2$ lie in a fixed residue class modulo $q$.
Using this, Lemma~\ref{Dirlemma} and Lemma~\ref{fourthmomentlemma}, the expression on the right-hand side of
(\ref{cha2}) is dominated by
$$
\ll (I_{p}I_{q}AB)^{1/2}\log^3 pq.
$$

{\it The final estimate.} Combining all contributions, we obtain
\begin{equation} \label{end2}
\begin{split}
& \mathop{\sum \sum}_{\substack{|a|\le A,\ |b|\le B,\ p, q \nmid ab \\ 2\sqrt{p}\alpha\le \lambda_{E(a,b)}(p)\le 2\sqrt{p}\beta \\  2\sqrt{q}\alpha\le \lambda_{E(a,b)}(q)\le 2\sqrt{q}\beta }} 1 \\
&= 4AB\sum\limits_{2\sqrt{p}\alpha\le r \le 2\sqrt{p}\beta}
\frac{H(r^2-4p)}{2p}\sum\limits_{2\sqrt{q}\alpha\le r \le 2\sqrt{q}\beta}
\frac{H(r^2-4q)}{2q} \\
& \hspace*{.25in} +O\left(\frac{AB(I_{p}+I_{q})}{pq}
+ABI_{p}I_{q}\left(\frac{1}{p^2q}+\frac{1}{pq^2}\right)+
(I_{p}I_{q}AB)^{1/2}\log^3 pq+
\frac{I_{p}I_{q}(A+B)}{\sqrt{pq}}\log pq\right).
\end{split}
\end{equation}
We have proved this estimate only for distinct primes $p,q$ with $p\equiv q
\equiv 1 \pmod{4}$, but the same estimate can be proved in the cases
$pq\equiv -1 \pmod{4}$ and $p\equiv q\equiv 3 \pmod{4}$ in a similar way.
Now we obtain Theorem~\ref{TH2} from (\ref{mu}), (\ref{start}), \eqref{goal2},
(\ref{app}), \eqref{app1},
(\ref{end2}), Theorem~\ref{maintermtheorem}, Lemma \ref{HPlemma}, $I_p\le H_p\ll p$,
$F(\alpha,\beta)\ge x^{-1/2}$ and the
prime number theorem. \newline

\noindent{\bf Acknowledgments.}  The authors would like to thank the
referee for his/her many comments.  This paper was written when the first
and second-named authors held postdoctoral fellowships at the Department
of Mathematics and Statistics at Queen's University and the Department
of Mathematics at the University of Toronto, respectively.   The authors
wish to thank these institutions for their financial support.  More in
particular, for the generous support and encouragement given to him during and
even after his stay in the University of Toronto, the second-named author owes a debt of gratitude to
Prof. John B. Friedlander.

redpajama_set_name: RedPajamaArXiv


It's incredibly hard to find a BMW in great shape with less than 100,000 miles for an affordable price, but look no further, you've found it here. It's also a two owner no accident car from the south. This 2011 5 series is as easy on the eyes as it is on the wallet, so come in today for a test drive!
Message: Thought you might be interested in this 2011 BMW 528i.


Why doesn't my maps app work?
Charity is wondering why she can't use GPS in Google Maps. She's on Android. Leo says to make sure your GPS is enabled. You also want to be sure your data is turned on. Leo also recommends using Google's other maps app ... WAZE. It's very popular and if that works, then you know that your GPS and Data is working and the maps app has corrupted. Easy to fix. Uninstall, then reinstall. The chatroom says that there is a legitimate blue dot issue that is related to a weak location. If there's also an error that says "cannot update maps," then that means you're not getting data.


text:
Tag - deforestation
West Papua is home to Asia's largest remaining rainforests, indigenous communities and unique species. But this exclusive 101 East investigation reveals how Korean-run companies are allegedly engaging in questionable deals as they buy up forests to develop palm oil plantations. Featuring rare access to a restive Indonesian province usually off-limits to journalists, we meet tribesmen who allege that Posco International and Korindo are plundering their land for a pittance. Both companies deny all allegations including fraud and human rights abuses. Selling Out West Papua was produced in collaboration with Mongabay, The Gecko Project and the Korea Centre for Investigative Journalism.
The Secret Deal To Destroy Paradise (2019)
Indigenous Auyu people in Boven Digoel, Papua, are living under the shadow of an environmental disaster. The Tanah Merah project is a plan to log billions of dollars-worth of precious timber from a vast area of pristine rainforest, raze what remains and replace it with oil palm. The project falls across one of the most important tracts of rainforest left in the world. The Auyu rely upon it for their livelihoods. The destruction is just beginning today, but already a vast area of forest has been destroyed. "All the natural resources that God has given us… It feels like the clouds have fallen," an elder from Anggai told us. "All destroyed in an instant."
Read the full story at www.thegeckoproject.org
Gender and palm oil: A day in the life of a female palm oil worker (2017)
Hear from Magdalena Pandan, a 35-year-old oil palm plantation worker in West Kalimantan, Indonesia, who rises before dawn every day to carry out her duties toward her job, her family and her crop lands.
Semunying, Indonesia (2016)
Jail is the reward for Momonus and Jamaludin to defend their ancestral lands. For 12 years already these Semunying indigenous territories have been controlled by P.T. In Ledo Lestari. Their dense forest had been turned into a palm oil plantation landscape. Although they have been persecuted and abused in their ancestral land, their fight is not extinguished.
Palm oil plantation in the PT. Ledo Lestari. West Kaliamantan. 2016
Momonus showing his picture in jail. West Kalimantan. 2016
Fransiska and her daughter. West Kalimantan. 2016
Forests are complex ecosystems that support a myriad of life forms. Forests play important roles in human life, functioning as a source of food, energy, livelihoods and homes for more than 48 million people all over the Indonesian archipelago. It also inspire the culture of Indonesian people. Over centuries, people evolved their cultural forest ethnicity, into a wealthy living harmony. This video will gives some description about the unique non-timber forest products produced by forest people that can create high economic value in the urban lifestyle while at the same time, forest will also connect us to the age old Indonesian ancient traditional heritage.
Filmed, directed and edited by Nanang Sujana for REDD+ Taskforce Indonesia and narrated by Nora-Jane Noone.
Manufacturing Consent; The abuses of palm oil company in Muara Tae (2014)
Nanang Sujana filming evidences and testimonies of people from Muara Tae in East Kalimantan, Indonesia about The abuses of palm oil company thought its subsidiary PT Borneo Surya Mining Jaya (PT Borneo). This film produced for Environmental Investigation Agency
Our Land is Gone – Mama Malind Su Hilang (2012)
The Malind Anim tribe in Zanegi Village, Merauke, Papua, Indonesia are hunter gatherers who rely on the forest for they livelihoods. They are born, raised and get food from the forest. But in the village of Zanegi, times have changed. The Medco corporation is clearing thousands of hectares of forest. Medco plans to convert 169,000 hectares of land to industrial tree plantations. This plantation is part of the milion hectare Meruake Integrated Food and Energy Estate, known as MIFEE.
Malind Children
A Malind mother with her child
Malind family gathering for meal
Harvesting sagoo
Malind children help cultivating sagoo
Malind family after fishing
Silent Cry in the Kampar Peninsula (2010)
The Kampar Peninsula is 700,000 hectares of peatland up to 15 metres deep, on the island of Sumatra, Indonesia. The peat contains more than 2 billion tonnes of carbon. 400,000 hectares of forest remain standing, 300,000 hectares have been converted to oil palm and pulp and paper plantations. All eyes are on the Kampar: loggers, carbon traders, and plantation companies including the giant RAPP pulpwood planter. But where does this leave the Akit and Melayu indigenous peoples who inhabit the peninsula? This film tells the human story behind one of the biggest carbon stores in the world.
My Forest Tears (2008)
Etnomusical Movie of Indonesian Forest
Bono Wave in Kampar River a Hidden Tourist Attraction (2014)
Yavana Sustainable Guitar (2014)
Serkap River (2013)

redpajama_set_name: RedPajamaCommonCrawl


text:
::- blog
::- about me
::- family
::- resume
::- projects
::- quotes
"If you fart in the bathroom, that's OK."
--Antonio Graffagnino, Age 3, trying to understand social norms.
"Probably the toughest time in anyone's life is when you have to murder a loved one because they're the devil."
--Emo Philips
"First the doctor told me the good news: I was going to have a disease named after me."
--Steve Martin
"A bum came up to me saying 'I haven't eaten in two days!' I said, 'You should force yourself!'"
--Henny Youngman
"I wish I could still play t-ball. I would yell out, 'Hey batter batter... there is no santa!'"
--John Borland
"Trying to be positive sucks.'"
--C.J. Graffagnino
"What's another word for Thesaurus?"
--Steven Wright
"I've always said, I like my coffee like I like my men... I don't drink coffee."
--Ellen DeGeneres
"If nobody's pissed off, then you're doing something wrong."
--Anonymous
"Remember: measure twice, then cut your finger."
--Dan Jordan
"Without internet access, I'm just a big meat-bag."
--Jason Plummer
"My dad is the guy who thinks the cocktail waitress likes him."
"Everyone has a plan 'til they get punched in the mouth."
--Mike Tyson
"I hope you all had a wonderful Thanksgiving. Or, as it's known to Native Americans - Sarcastic You're Welcomesgiving."
--Stephen Colbert
"If you missed Black Friday or Cyber Monday, don't worry - there's still time for you to miss the point of Christmas."
--Joe Machi
"You know what it's like having five kids? Imagine you're drowning. And someone hands you a baby."
--Jim Gaffigan
You can prematurely optimize maintainability, flexibility, security, and robustness just like you can performance.
--John Carmack
All models are wrong, but some are useful.
--George E.P. Box
The most amazing achievement of the computer software industry is its continuing cancellation of the steady and staggering gains made by the computer hardware industry.
--Henry Petroski
Dr. Huner
Click here to see my favorite quotes from Dr. Huner, one of my college professors.
"Permit me to issue and control the money of a nation and I care not who makes its laws."
--Mayer Anselm Rothschild
"I am a most unhappy man. I have unwittingly ruined my country. A great industrial nation is controlled by its system of credit. Our system of credit is concentrated. The growth of the nation, therefore, and all our activities are in the hands of a few men. We have come to be one of the worst ruled, one of the most completely controlled and dominated governments in the civilized world. No longer a government by free opinion, no longer a government by conviction and the vote of the majority, but a government by the opinion and duress of a small group of dominant men."
--President Woodrow Wilson in reference to signing the Federal Reserve Act in 1913
For more quotes about the Federal Reserve, see this page. More Americans need to open their eyes to monetary policy!!!
"I apprehend no danger to our country from a foreign foe - Our destruction, should it come at all, will be from another quarter. From the inattention of the people to the concerns of their government, from their carelessness and negligence, I must confess that I do apprehend some danger. I fear that they may place too implicit a confidence in their public servants, and fail properly to scrutinize their conduct; that in this way they may be made the dupes of designing men, and become the instruments of their own undoing. Make them intelligent, and they will be vigilant; give them the means of detecting the wrong, and they will apply the remedy."
--Daniel Webster, Jun 1 1837
"Those who expect to reap the blessings of freedom must, like men, undergo the fatigue of supporting it."
--Thomas Paine
"If tyranny and oppression come to this land, it will be in the guise of fighting a foreign enemy. Of all the enemies to public liberty, war is perhaps the most to be dreaded because it comprises and develops the germ of every other. War is the parent of armies; from these proceed debts and taxes; and armies, and debts, and taxes are the known instruments for bringing the many under the domination of the few. The loss of liberty at home is to be charged to the provisions against danger, real or imagined, from abroad."
--James Madison
"You and I are told we must choose between a left or right, but I suggest there is no such thing as a left or right. There is only an up or down. Up to man's age-old dream - the maximum of individual freedom consistent with order - or down to the ant heap of totalitarianism. Regardless of their sincerity, their humanitarian motives, those who would sacrifice freedom for security have embarked on this downward path. Plutarch warned, 'The real destroyer of the liberties of the people is he who spreads among them bounties, donations and benefits.'"
--Ronald Reagan, Oct 27 1964
"A free people ought not only to be armed and disciplined, but they should have sufficient arms and ammunition to maintain a status of independence from any who might attempt to abuse them, which would include their own government."
--George Washington
It will be of little avail to the people, that the laws are made by men of their own choice, if the laws be so voluminous that they cannot be read, or so incoherent that they cannot be understood.
Those who deny freedom to others, deserve it not for themselves; and, under a just God, can not long retain it.
--Abraham Lincoln
Government is not reason, it is not eloquence, it is force; like fire, a troublesome servant and a fearful master. Never for a moment should it be left to irresponsible action.
The government is merely a servant -- merely a temporary servant; it cannot be its prerogative to determine what is right and what is wrong, and decide who is a patriot and who isn't. Its function is to obey orders, not originate them.
--Mark Twain
--Edward R. Murrow
All who have meditated on the art of governing mankind have been convinced that the fate of empires depends on the education of youth.
--Aristotle
When fascism comes to America, it will be wrapped in the flag and carrying a cross.
--Sinclair Lewis
The test of courage comes when we are in the minority. The test of tolerance comes when we are in the majority.
--Ralph W. Sockman
Don't take refuge in the false security of consensus, and the feeling that whatever you think, you're bound to be okay because you're in the safely moral majority.
--Christopher Hitchens
Oppression breeds the power to oppose it.
--Andrew Solomon
Historically, the most terrible things - war, genocide, and slavery - have resulted not from disobedience, but from obedience.
--Howard Zinn
Those who do not move, do not notice their chains.
--Rosa Luxemburg
How does something immoral, when done privately, become moral when it is done collectively? Furthermore, does legality establish morality? Slavery was legal; apartheid is legal; Stalinist, Nazi, and Maoist urges were legal. Clearly, the fact of legality does not justify these crimes. Legality, alone, cannot be the talisman of moral people.
--Walter E. Williams
Ignorance and misinformation, if allowed to prevail, handicap this country's security. In a world of complex and continuing problems, in a world full of frustrations and irritations, America's leadership must be guided by the lights of learning and reason -- or else those who confuse rhetoric with reality and the plausible with the possible will gain the popular ascendance with their seemingly swift and simple solutions to every world problem.
--John F. Kennedy (written but never delivered due to assassination)
We must sail sometimes with the wind and sometimes against it - but sail we must, and not drift, nor lie at anchor.
--Oliver Wendell Holmes
The ultimate weakness of violence is that it is a descending spiral, begetting the very thing it seeks to destroy. Instead of diminishing evil, it multiplies it. Through violence you may murder the liar, but you cannot murder the lie, nor establish the truth. Through violence you may murder the hater, but you do not murder hate. In fact, violence merely increases hate. So it goes. Returning violence for violence multiplies violence, adding deeper darkness to a night already devoid of stars. Darkness cannot drive out darkness: only light can do that. Hate cannot drive out hate: only love can do that. Hate multiplies hate, violence multiplies violence, and toughness multiplies toughness in a descending spiral of destruction.... The chain reaction of evil - hate begetting hate, wars producing more wars - must be broken, or we shall be plunged into the dark abyss of annihilation.
--Martin Luther King, Jr.
A native American boy was talking with his grandfather. "What do you think about the world situation?" he asked.
The grandfather replied, "I feel two wolves are fighting in my heart. One is full of anger and hatred; The other is full of love, forgiveness and peace."
"Which one will win?" asked the boy.
"The one I feed."
--Unknown
A great many people think they are thinking when they are really rearranging their prejudices.
If you want to build a ship, don't drum up people to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea.
--Antoine de Saint-Exupery
Your need for acceptance can make you invisible in this world. Risk being seen.
--Jim Carrey
Life is full of many more "third and long" situations than "second and one".
--Jim "Mattress Mack" McIngvale
Maturity: To be able to stick with a job until it is finished; to do one's duty without being supervised; to be able to carry money without spending it; and to be able to bear an injustice without wanting to get even.
--Ann Landers
Of all the sciences cultivated by mankind, Astronomy is acknowledged to be, and undoubtedly is, the most sublime, the most interesting, and the most useful. For, by knowledge derived from this science, not only the bulk of the Earth is discovered... but our very faculties are enlarged with the grandeur of the ideas it conveys, our minds exalted above [their] low contracted prejudices.
--James Ferguson (1757)
To love at all is to be vulnerable. Love anything and your heart will be wrung and possibly broken. If you want to make sure of keeping it intact you must give it to no one, not even an animal. Wrap it carefully round with hobbies and little luxuries; avoid all entanglements. Lock it up safe in the casket or coffin of your selfishness. But in that casket, safe, dark, motionless, airless, it will change. It will not be broken; it will become unbreakable, impenetrable, irredeemable. To love is to be vulnerable.
--C.S. Lewis
Last Modified: 07.03.19


The software update to fix the issue has already been rolled out.
Just a few days after fairly worrying reports that Nokia 7 Plus smartphones have been found to be sharing user data with servers in China, HMD Global has issued a clarification on the matter. Nokia says that the device activation client which was meant for the Chinese variant of the Nokia 7 Plus phones was mistakenly included in the software package of a single batch of Nokia 7 Plus phones which were sold outside of China.
"Due to this mistake, these devices were erroneously trying to send device activation data to a third party server. However, such data was never processed, and no person could have been identified based on this data," HMD Global says in a statement shared with News18. The company further goes on to specify that in no instance was any personally identifiable information shared with any third-party in China. The data in question in this case, according to HMD Global, is the activation data which is used by the company to register the phone for warranty when it is used for the first time, as well as phone diagnostics. While this data is collected from all phones sold by HMD Global (and indeed other phone makers too), the difference is that the Nokia 7 Plus variants sold in China transmit this data to a server located within China. This is demanded by the Chinese Cyber Security laws, which demand that data originating from China must be stored on a server in China.
HMD Global also clarifies this activation and diagnostic data collected from phones sold in India, US and Europe is stored on a server based in Singapore. The company confirms that it adheres to the strict General Data Protection Regulation (GDPR) laws in Singapore. "There is also some speculation about other Nokia phones sharing similar data with third-party servers. We can confirm that this is incorrect speculation and no Nokia phones are impacted. All device data of Nokia Phones other than the China variant is stored at HMD Global's servers in Singapore provided by Amazon Web Services. HMD Global takes the security and privacy of its consumers seriously and complies with all applicable privacy laws. Data collected from our devices is stored safely in accordance with applicable laws," says Nokia in an official statement.
HMD Global says this issue has been fixed in February 2019 via a software update, which has now been rolled out to all impacted Nokia 7 Plus phones.
But how would you check if your phone is running the software that has fixed the issue? On your Nokia 7 Plus phone, go to Settings -> System -> About Phone -> Build Number. If the build number here is "00WW_3_39B_SP03" or "00WW_3_22C_SP05", that means the fix has already been installed on your Nokia 7 Plus. If not, you can check for new updates to get this patch.


text:
<?php
//php.ini 设置 yaf.use_spl_autoload=on
define("APP_PATH",  dirname(__DIR__)); /* 指向public的上一级 */
if(!defined('SOOH_INDEX_FILE')){
	define ('SOOH_INDEX_FILE', 'index.php');
}
define('SOOH_ROUTE_VAR','__');
error_log("-------------------------------------------------------tart:route=".$_GET['__']." cmd=".$_GET['cmd']." pid=".  getmypid());
include dirname(__DIR__) .'/conf/globals.php';

$ini = \Sooh\Base\Ini::getInstance();
$app  = new Yaf_Application(APP_PATH . "/conf/application.ini");

$dispatcher = $app->getDispatcher();
if(!empty($reqeustReal)){
	$dispatcher->setRequest( $reqeustReal );
}

$view = \SoohYaf\SoohPlugin::initYafBySooh($dispatcher);
$dispatcher->returnResponse(TRUE);
try{
	$response = $app->run();
}catch(\ErrorException $e){
	$view->assign('code',$e->getCode());
	$view->assign('msg',$e->getMessage());
	error_log("Error Caught at index.php:".$e->getMessage()."\n".\Sooh\DB\Broker::lastCmd()."\n".$e->getTraceAsString()."\n");
	$response=new Yaf_Response_Http();
	$response->setBody($view->render('ctrl/action.phtml'));
}

if($ini->viewRenderType()==='json'){
	header('Content-type: application/json');
}
$response->response();

\Sooh\Base\Ini::registerShutdown(null, null);
error_log("====================================================================end:route=".$_GET['__']." cmd=".$_GET['cmd']." pid=".  getmypid());

redpajama_set_name: RedPajamaGithub


text:
S&Ds welcome Commission's proposal to end veto on taxation and announce up-coming new study on tax gap
S&D - Socialists & Democrats in the European Parliament
Press release on socialistsanddemocrats.eu
Reacting to a Commission proposal to extend majority voting to all EU tax policies by the end of 2020, which is expected to be presented by EU Commissioner Pierre Moscovici today, S&D Group leader Udo Bullmann stated:
"Taxation is one of the last EU policy areas where decisions rely on unanimity. We cannot afford the anachronism of a national veto on taxation after the Panama Papers and Luxleaks have exposed the industrial scale of global tax evasion and its cross-border nature.
"Far too often, member states have blocked moves for fairer taxation only to protect their specific national tax models at the expense of European citizens. Unhealthy competition, for instance through tax rulings or specialised tax schemes, must stop. To achieve true progress in the field of taxation, unanimity must be dropped.
"Tax evasion is depriving society of billions of euros every year. Hard-working, honest people and companies, who play by the rules, foot the bill for the cheaters.
"After having led the battle against tax crimes for years, the Socialists and Democrats will present a follow-up study to a 2012 report next week. The 2012 study found evidence of a tax gap of one trillion euro – hence tax revenue lost due to evasion and fraud.
"The new report finds that the few measures implemented during the current parliamentary mandate have had a measurable impact on the size of this gap. This shows that cooperation to close loopholes in taxation pays off and must be beefed up."
To learn more about the S&Ds commissioned study on tax evasion and the S&Ds proposals on fair taxation please get in touch: Silvia Pelz